2016年7月26日 星期二

openswan

sudo /etc/init.d/ipsec restart sudo ipsec auto --add test sudo ipsec whack --name test --listen --initiate conn test left=%eth2 leftsourceip=10.20.90.1 leftsubnet=10.20.90.0/24 # leftid=116.59.9.76 leftid=@00A6C2278850 right=61.216.103.2 # rightid=61.216.103.2 rightid=@18B1690131A0 rightsubnet=10.9.8.0/24 rightnexthop=10.9.8.254 rekeymargin=3m keyingtries=2 pfs=no aggrmode=yes ike=3des-sha1-modp1024 # ikev2=yes phase2=esp phase2alg=3des-sha1 authby=secret ikelifetime=28800s auto=start rm /var/run/pluto -rf mkdir /var/run/pluto -p ifconfig ppp0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}' echo @00A6C2278850 @18B1690131A0 : PSK \"25683366\" > /etc/ipsec.secrets killall -9 pluto /usr/libexec/ipsec/pluto --stderrlog --nofork --use-netkey --secretsfile /etc/ipsec.secrets --nat_traversal & /usr/libexec/ipsec/whack --name sonic --ipv4 --host 10.183.128.223 --client 10.20.90.0/24 --srcip 10.20.90.1 --id @00A6C2278850 --to --host 61.216.103.2 --client 10.9.8.0/24 --srcip 61.216.103.2 --id @18B1690131A0 --esp 3des-sha1 --ike 3des-sha1-modp1024 --encrypt --psk --aggrmode /usr/libexec/ipsec/whack --name sonic --listen --initiate

沒有留言:

張貼留言