Author Topic: Allow IP to access your Firewall (iptables)  (Read 4209 times)

Offline admin

  • Administrator
  • Sr. Member
  • *****
  • Posts: 296
    • View Profile
Allow IP to access your Firewall (iptables)
« 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