Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 have two routers, R1 and R2.

  • R1 (a stock linksys router running dd-wrt) is connected to internet and is serving internet to a network of 5 devices/PCs running a DHCP server, with a network of R1 also serves internet services to R2.

  • R2 (a ubuntu server 12.04) gets internet from R1. R2 has 3 PCs attached to it, runs a DHCP server with a network of

My requirement is that the clients on both sides should not talk to each other at all – with the exception that R1 clients may access the R2 router through its IP of 192.168.1.x.

At the moment, R2 clients are able to ping R1 clients, which is unacceptable, whereas R1 clients cannot ping R2 clients, which is OK.

I believe iptables could be set up but I don't know how.

share|improve this question
up vote 1 down vote accepted

This should work:

Router R1

iptables -t filter -A FORWARD -s -d -j DROP

Router R2

iptables -t filter -A FORWARD -d -j DROP

For reference, see the iptables flowchart.

share|improve this answer
thanks... i am away from my network now... i will try it once i get there. but i understand the logic behind this and this looks promising. thanks once again. – Farhan Ali Sep 23 '12 at 9:46
works just as i wanted. thanks a million... – Farhan Ali Sep 23 '12 at 14:43
You're welcome. If you like this answer you may also give it an upvote. – artistoex Sep 23 '12 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .