linux router setup... use iptables???
Wonder if somebody can help me out a little here.
I'm trying to simulate two machines sitting on two different C class networks - being connected by a router (which in this case i want to be a linux router).
I want to be able to ping either network from each other.
so for eg
clientA: 192.168.1.100/24 eth0
clientB: 192.168.2.100/24 eth0
serverA: 192.168.1.1/24 eth0
I've read around enough to know the answer lies in a iptables file/ setting - but i think i'm gonna have to get a good book on the iptables subject ...
Any help would be most appreciated.
thanks in advance - at.
Well I believe IPTables is probably definitely what you would like to use in this case. There are two books that I know of out there.
Linux Firewalls - It is mainly geared towards firewalls but has a lot of information on IPTables as far as setting up multiple Class C networks behind one router.
Linux Routers - I have no read this so I really can't comment on it, but it has gotten good reviews from Amazon.
I hope this helps
1. google for 'iptables tutorial' will give you a very good book
2. clients: need a default route added to their routing table
route add default gw <gateway address> dev eth0
3. router: needs to have forwarding enabled:
echo 1 > /proc/sys/net/ipv4/ip_forward
if this still should not work, make sure iptables is not blocking any traffic at all (in none of the tables)
setting the policies to ACCEPT and Flushing all the tables will do the job, though i think you should be fine.
i gues you are not trying to setup NAT so the obove mentioned things sould be enough. once you get that part running, you can close down ports with iptables aso.
little hint: usually you set a router to be the hightes of you ip range (192.168.1.254)
hope this helps
|All times are GMT -5. The time now is 11:43 PM.|