Developers Heaven Forum

Operating Systems => Lunix & Unix => Topic started by: admin on April 02, 2011, 01:14:52 AM

Title: Allow IP to access your Firewall (iptables)
Post by: admin on April 02, 2011, 01:14:52 AM
If you have two servers and you want have them connected to each other, then you have to allow access for there IPs on each other through your firewall.
Say your sever1 IP is: 174.140.168.162
Then you can run on server2:
 
Code: [Select]
iptables -A INPUT   -j ACCEPT -p all -s 174.140.168.162
iptables -A OUTPUT  -j ACCEPT -p all -d 174.140.168.162
service iptables save
and you can check the result by:
Code: [Select]
iptables -L  -n -v --line-numbers