Routing between LANs and the Internet

swgit used Ask the Experts™
Dear Experts,
I have a following setup:
[list]Home LAN connected to the Internet on[/list]
[list]Lab/Test LANs on 192.168.30.x & 192.168.40.x[/list]
[list]VMnet3 for .30 and VMnet4 for .40[/list]
I would like some of the machines in the Lab/Test LANs to access the Internet, so I'd tried to setup a router.. without having any success so far
Router (RHEL6.9):
eth0 =, GW:
eth1 =
eth2 =
#netstat -nr
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0   U         0 0          0 eth1   U         0 0          0 eth2     U         0 0          0 eth0     U         0 0          0 eth1     U         0 0          0 eth2         UG        0 0          0 eth0
Desktop on .30 (also RHEL6.9)
eth0 =, GW:
#netstat -nr
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface   U         0 0          0 eth0         UG        0 0          0 eth0
I can ping the GW at but that's about it... not sure what is missing...  Please help!  Thanks.

p.s. I also included the images for both settings.
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Robert RComputer Service Technician

What type of internet service provider ( ISP) do you have? You should receive some type of device from your ISP to connect you to the internet that connects either through the cable or through the tv lines.
Mihai BarbosTrying to tame bits. They're nasty.

Do you have IP forwarding enabled ?
IP Forwarding
Top Expert 2011

Do you have NAT configured. You can't just route to the internet. You need to nat behind a public address.
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

swgitIT Professional


@mihai - yes, i did enable forwarding in /etc/sysctl.conf is not the internet : it is a LAN address likely provided by your ISP

chances are the ISP will NAT to the actual WAN address and ignore other addresses

try and SOURCE NAT 192.168/16 networks to
if the address is as i can see in the screenshot, the same applies.

in linux, you can nat to eth0 address without specifying the address which is convenient if that address is acquired through dhcp and changes
To me it looks like
- your ISP is providing you the net
- is the ISP NAT router/modem/firewall
- are IP addresses available to you and are in the NAT your provider allows to you
- if you want other networks to reach the internet you will have to NAT them on your "router" box to the 10.0.0.X net,
- you can then route the resulting 10.0.0.x address towards the Internet via (the "default route" on your router box)

Usually if you route the 192.168.x.x net to your ISP device it "refuses" to NAT those networks for you - it only knows about the 10.0.0.X network and how to NAT it to the Internet.
+1 thks for the rephrase

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial