strongwan不主动连接问题和日志配置

不主动发起连接: 将ipsec.conf的auto设置为start

config setup
     uniqueids=never
conn %default
     authby=psk
     type=tunnel
conn tonyidc
    ...
     auto=start
    ...

日志配置 strongswan.conf

# strongswan.conf - strongSwan configuration file
#
# Refer to the strongswan.conf(5) manpage for details
#
# Configuration changes should be made in the included files

charon {
	load_modular = yes
	#aggressive=yes
	plugins {
		include strongswan.d/charon/*.conf
	}

    filelog {
        charon {
            path = /var/log/charon/charon.log
            time_format = %b %e %T
            ike_name = yes
            append = no
            default = 1
            flush_line = yes
        }
        stderr {
            ike = 1
            knl = 1
        }
    }
}

include strongswan.d/*.conf

Q.E.D.