We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
环境: Google Cloud Platform 谷歌云 System: CentOS6 Kernel: 2.6.32-504.3.3.el6.x86_64
症状: 安装成功,连接成功,NAT转发成功,能打开网页,但是重启服务器后,使用ipsec start启动服务,连接成功,却无法打开网页。
ipsec start
研究结果: 发现在安装脚本的iptables_check函数中调用了sysctl --system,仔细观察了一下,GCP的CentOS6除了系统自带的/etc/sysctl.conf以外,还自带了一个文件: /etc/sysctl.d/11-gce-network-security.conf。这俩文件都是net.ipv4.ip_forward=0,而脚本自己生成了一个/etc/sysctl.d/10-ipsec.conf。也就是这三个文件得一起应用才行。
iptables_check
sysctl --system
/etc/sysctl.conf
/etc/sysctl.d/11-gce-network-security.conf
net.ipv4.ip_forward=0
/etc/sysctl.d/10-ipsec.conf
解决方案: 有两种解决方案 一、系统启动后运行sysctl --system,可以添加到/etc/rc.local的最后一行中,系统启动后自动执行。 二、手动修改以下三个文件: 1) /etc/sysctl.conf 2) /etc/sysctl.d/11-gce-network-security.conf 3) /etc/sysctl.d/10-ipsec.conf 确保这三个配置文件中都是net.ipv4.ip_forward=1
/etc/rc.local
net.ipv4.ip_forward=1
还有一个设置要改动,但未确认有没有关系。 谷歌云控制台 > VPC网络 > default > 修改 > 动态路由模式 修改为 全局,然后保存。
The text was updated successfully, but these errors were encountered:
No branches or pull requests
环境:
Google Cloud Platform 谷歌云
System: CentOS6
Kernel: 2.6.32-504.3.3.el6.x86_64
症状:
安装成功,连接成功,NAT转发成功,能打开网页,但是重启服务器后,使用
ipsec start
启动服务,连接成功,却无法打开网页。研究结果:
发现在安装脚本的
iptables_check
函数中调用了sysctl --system
,仔细观察了一下,GCP的CentOS6除了系统自带的/etc/sysctl.conf
以外,还自带了一个文件:/etc/sysctl.d/11-gce-network-security.conf
。这俩文件都是net.ipv4.ip_forward=0
,而脚本自己生成了一个/etc/sysctl.d/10-ipsec.conf
。也就是这三个文件得一起应用才行。解决方案:
有两种解决方案
一、系统启动后运行
sysctl --system
,可以添加到/etc/rc.local
的最后一行中,系统启动后自动执行。二、手动修改以下三个文件:
1)
/etc/sysctl.conf
2)
/etc/sysctl.d/11-gce-network-security.conf
3)
/etc/sysctl.d/10-ipsec.conf
确保这三个配置文件中都是
net.ipv4.ip_forward=1
还有一个设置要改动,但未确认有没有关系。
谷歌云控制台 > VPC网络 > default > 修改 > 动态路由模式 修改为 全局,然后保存。
The text was updated successfully, but these errors were encountered: