Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am having trouble isolating a specific host from others on my lan.

What I am trying to do is only allow communication between and as well as not allow any other host to access

iptables -A FORWARD -s -d -j ACCEPT
iptables -A FORWARD -s -d -j ACCEPT
iptables -A FORWARD -s -d -j DROP
iptables -A FORWARD -s -d -j DROP

Default policy for forwarding is drop.

I have a machine with ip that still can access even after rebooting all machines. What am I doing wrong?


(facepalm) I forgot to restore my iptable rules when restarting the firewall. My rules worked just fine once I did that.

share|improve this question
Can you post the full output of iptables-save? – Isaac Freeman May 25 '13 at 18:22
Also, which host are these iptables configs set up on? Or is this on a linux-based firewall in between them? – Isaac Freeman May 25 '13 at 18:24
I have this setup on a centos box sitting between the two hosts. – user650271 May 29 '13 at 2:20

Where are these iptables being implemented? On either 0.2 or 0.8? Or is it an intermediary device?

I would recommend, putting these statements on either host:

iptables -A INPUT -s -j ACCEPT
iptables -A INPUT -s -j ACCEPT
iptables -A INPUT -s -j DROP

Obviously, use the appropriate first/second statement for whichever machine you are placing these on. For the hosts, the INPUT chain filters all incoming traffic.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.