Skip to content
New issue

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

执行了脚本,出现 warning #1

Open
s1u opened this issue Dec 15, 2014 · 3 comments
Open

执行了脚本,出现 warning #1

s1u opened this issue Dec 15, 2014 · 3 comments

Comments

@s1u
Copy link

s1u commented Dec 15, 2014

sh 了脚本文件后,滚了几屏幕,出现提示设置端口、用户名、密码,在接下来有事滚了几屏,就到了下面,

Chenking FirewallD status...
WARNING!!! FirewallD is Wrong!

Chenking ocserv service status...
ocserv-install-script-for-centos7.sh: line 570: netstat: command not found
ocserv-install-script-for-centos7.sh: line 571: netstat: command not found
ocserv-install-script-for-centos7.sh: line 572: netstat: command not found
WARNING!!! ocserv service is Wrong!

@travislee89
Copy link
Collaborator

应该是firewalld没有装或者没有启动,net-tools工具没有安装。

@s1u
Copy link
Author

s1u commented Dec 17, 2014

能不能说下怎么检测 firewall 有没有装或者怎么启动?centos 是在搬瓦工上面直接 new os 的。

On Wed, Dec 17, 2014 at 12:21 AM, Travis Lee [email protected]
wrote:

应该是firewalld没有装或者没有启动,net-tools工具没有安装。


Reply to this email directly or view it on GitHub
#1 (comment)
.

@travislee89
Copy link
Collaborator

是 firewalld,CentOS 7 下默认代替 iptables 的防火墙
搬瓦工没有使用过,估计是卸载了 firewalld,改用 iptables 了
iptables 可以用以下命令,需要更改 192.168.8.0/21(ocserv使用的 IP段) 和 eth0(服务器的网卡名称)
iptables -t nat -A POSTROUTING -s 192.168.8.0/21 -o eth0 -j MASQUERADE
这个命令重启后会失效,可以用 service iptables save 保存,或者直接更改 /etc/sysconfig/iptables

如果两个防火墙都没有安装,需要安装一个,服务器推荐用 iptables。
安装后需要先配置开启 ssh 的端口,再开启防火墙。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants