
为了安全,服务器最好开启防火墙,开启部分端口。下面是Linux系统防火墙设置教程
1.永久有效
开启: chkconfig iptables on
关闭: chkconfig iptables off
2.即刻生效
开启: service iptables start
关闭: service iptables stop
3.开启部分端口
vim /etc/sysconfig/iptables
添加想要开启的相关端口
-A INPUT -m state --state NEW -m tcp -p tcp --dport 6379 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8081 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 8082 -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 3306 -j ACCEPT
service iptables restart
最新评论
Hey very cool web site!! Man .. Excellent .. Wonderful .. I'll bookmark your website and take the feeds also? I am glad to seek out a lot of helpful information here in the publish, we need develop extra techniques on this regard, thank you for sharing. . . . . .
Wonderful website you have here but I was curious if you knew of any message boards that cover the same topics talked about in this article? I'd really like to be a part of group where I can get comments from other experienced people that share the same interest. If you have any recommendations, please let me know. Kudos!
I all the time used to read post in news papers but now as I am a user of net thus from now I am using net for articles, thanks to web.
Hi! I've been following your website for a while now and finally got the courage to go ahead and give you a shout out from Atascocita Texas! Just wanted to tell you keep up the good job!
I relish, cause I discovered just what I was taking a look for. You've ended my 4 day long hunt! God Bless you man. Have a nice day. Bye
I am really impressed along with your writing talents as smartly as with the layout in your weblog. Is that this a paid theme or did you customize it yourself? Anyway keep up the nice quality writing, it is rare to peer a nice weblog like this one today!
I'm really inspired with your writing skills and also with the layout on your weblog. Is this a paid subject or did you modify it your self? Anyway stay up the nice quality writing, it is rare to see a nice weblog like this one these days.
Great article, totally what I wanted to find.