The company recently on the network security catch more strict, require firewall must be open, but the Project Server has five or six, three for load balancing, the server must be a variety of connections between, it can only be added by the whitelist.
Board the server, edit the firewall configuration file
Vi/etc/sysconfig/iptables
Add additional server IP addresses that need access to the server, and the port number that the server needs to open
As follows:
# Firewall configuration written by system-config-firewall# Manual customization of this file is not recommended.*filter:i Nput Accept [0:0]:forward Accept [0:0]:output accept [0:0] #这里开始增加白名单服务器ip (please remove the IP address of the current server)-N whitelist-a whitelist-s 192.168.111.xxx-j accept-a whitelist-s 192.168.111.xxx-j accept-a whitelist-s 192.168.111.xxx-j ACCEPT-A whitelist-s 192.168.111.xxx-j accept-a whitelist-s 192.168.111.xxx-j accept# here End Whitelist server ip-a input-m State--state ESTABLISHED,RELA TED -j ACCEPT-A INPUT -p icmp -j ACCEPT-A INPUT -i lo -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j A CCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 13020 -j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dpor T 1000:8000-j Accept//Open all ports between 1000 and 8000//above these ACCEPT port numbers, the public intranet can be accessed//below these whitelist port numbers, only between servers via intranet access # Add here for whitelist IP open Port-a input-m state--state new-m tcp-p TCP--dport 22-j whitelist-a input-m State--state new-m tcp-p TCP--dport 13009-j whitelist-a input-m State --state new-m tcp-p TCP--dport 10080-j whitelist# this ends for whitelist IP open Port-a input-j REJECT--reject-with icmp-host-prohibited- A forward-j REJECT--reject-with icmp-host-prohibitedcommit
When you're done editing, don't forget to restart the firewall
Service Iptables Restart
Transferred from: http://www.cnblogs.com/yashi/p/7550669.html
Linux Server firewall Whitelist settings