强>
<强> 强>
<强> 强>
<强> 强>
<强> 强>
,<强>本文重点是以此来完成企业需求的强>
不能像子网内部主机那样透明访问远程子网的主机,也就是说:如果你是一个使用LClient的移动用户,经常出差或是在不同的地点办公,你的LClient将不能用Network-To-Network方式与公司网络进行连接.Road战士方式正是为这种情况而设计的,连接建立后,你的LClient就可以连接到远程的网络了。
强>
北京 * * * server1外网,,,eth0 , 192.168.2.48 ,,,, 桥接内网,,,,,,,,,eth2 , 192.168.183.1 ,,,, VMnet1网关,,,,,,,,,,,,192.168.2.1
上海 * * * server2 外网eth0 , 192.168.2.111 ,,,, 桥接内网eth2 , 192.168.233.1 ,,,, VMnet2网关,,,,,192.168.2.1client1 ,,, 推荐- - - - - -北京 eth0 ,,,,, 192.168.183.44 ,, VMnet网关,,,,,,192.168.183.1 ,,,, 说明,我使用的是网关路由模式,是客户端机器通过此网关来通信 client2 ,,, - - - - -上海 eth0 ,,,,,, 192.168.233.44 , VMnet4 网关,,,,,,,192.168.233.1
强>
1,开启数据转发 #,vim /etc/sysctl.conf net.ipv4.ip_forward =, 1 net.ipv4.conf.default.rp_filter =, 0 2,关闭icmp重定向#,sysctl -a |, egrep “ipv4。*(接受|发送)_redirects”, |, awk -F “=?“{打印1美元=,0“}”,在在/etc/sysctl.conf #,sysctl - p 3、关闭SELinux #, setenforce 0 4、安装openswan ,,,(两台* * *服务上面都是同样操作 #,yum install  openswan lsof - y #,rpm -ql  openswan ,,,,,//查看安装了那些文件。 #,ipsec ——version ,,,,,,//查看ipsec的版本 (root@ * * * server1 等等)#,ipsec ——version , Linux Openswan  U2.6.32/k2.6.32 - 431. el6.x86_64 (netkey) 阅读“ipsec ——版权”,for copyright 信息。 这里并没有加载任何的IPsec 堆栈,当启动IPsec后会自动加载系统自带的netkey。 (root@ * * * server1 等等)# service ipsec 开始 (root@ * * * server1 等等)#,ipsec verify ,,,//对ipsec进行验证(两台* * *服务上面都是同样操作)
[root@localhost ~] #, ipsec 验证 Checking your  system 用阅读if IPsec got installed 以及started 正确: Version check 以及ipsec on-path ,,,,,,,,,,,,,,,,,,,,,,,,,,,(好) Linux Openswan  U2.6.32/K (no kernel  code presently 加载) Checking for  IPsec support 拷贝kernel ,,,,,,,,,,,,,,,,,,,,,,,,,(失败) ,SAref kernel  support ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,, (N/A) Checking that  pluto is  running ,,,,,,,,,,,,,,,,,,,,,,,,,,,,(失败) ,,正常:Pluto is not running (no “冥王星/var/运行//pluto.ctl”) more  Two ,或是;interfaces 发现,checking IP forwarding ,,,,,,,,,,,,,(失败) ,,正常:Pluto is not running (no “冥王星/var/运行//pluto.ctl”), Checking NAT 以及MASQUERADEing ,,,,,,,,,,,,,,,,,,,,,,,,,,,,,(好) null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null null nullCentOS 6.5 ipesc下Openswan实现双IDC互联