Wednesday, 21 August 2013

Ubuntu-Server router - forwarding/routing does not work

Ubuntu-Server router - forwarding/routing does not work

This is more or less a pretty general question about forwarding and
routing with ubuntu server or any linux system, i guess.
The server manages a school network and has 8 NICs - each on a different
network.
7 leading to different classrooms.
1 leading into the network, that contains other servers (print server,
domain controller, etc ..) - and finally another gateway in that network
leads to the internet.
I want to:
- forward the traffic coming from the 7 classrooms to the network that
contains the other servers/that leads to the internet
- forward some traffic the other way round (e.g. print-server to printers
in classrooms)
I do not want to:
- do NAT
- edit every routing-table on every single client-PC in the classrooms
As I understood it, just enabling net.ipv4.ip_forward=1 via sysctl and
sysctl.conf should have done the trick .. But it didn't.
After reading and trying out a lot of different stuff, I tried the
following iptables-rule.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
eth0 being the network leading to the other servers and the internet.
And that worked .. but this is a NAT rule.
So my big question is:
Is there a way at all to do it without the NAT-rule? Or:
What does it take, to do it without the NAT-rule?
Thanks to all of you in advance.

No comments:

Post a Comment