5865

Centos7 openswan Site-to-Site(L2L) VPN

首先安装openswan

yum install openswan

修改内核参数启用转发和禁止重定向

修改sysctl.conf文件

vi /etc/sysctl.conf

添加以下内容

net.ipv4.conf.default.send_redirects=0
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.conf.default.log_martians=0
net.ipv4.conf.all.log_martians=0
net.ipv4.conf.default.accept_source_route=0
net.ipv4.conf.all.accept_redirects=0
net.ipv4.conf.default.accept_redirects=0
net.core.xfrm_larval_drop=1
net.ipv4.ip_forward = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0