Routing between LANs and the Internet

swgit
swgit used Ask the Experts™
on
Dear Experts,
 
I have a following setup:
 
[list]Home LAN connected to the Internet on 10.0.0.0[/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 = 10.0.0.100/24, GW: 10.0.0.1
eth1 = 192.168.30.254/24
eth2 = 192.168.40.254/24
 
#netstat -nr
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
10.0.0.0        0.0.0.0         255.255.255.0   U         0 0          0 eth0
192.168.30.0    0.0.0.0         255.255.255.0   U         0 0          0 eth1
192.168.40.0    0.0.0.0         255.255.255.0   U         0 0          0 eth2
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0 eth2
0.0.0.0         10.0.0.1        0.0.0.0         UG        0 0          0 eth0
 
Desktop on .30 (also RHEL6.9)
eth0 = 192.168.30.16/24, GW: 192.168.30.254
 
#netstat -nr
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.168.30.0    0.0.0.0         255.255.255.0   U         0 0          0 eth0
0.0.0.0         192.168.30.254  0.0.0.0         UG        0 0          0 eth0
 
I can ping the GW at 192.168.30.254... but that's about it... not sure what is missing...  Please help!  Thanks.

p.s. I also included the images for both settings.
desktop_network_settings.JPG
router_network_settings.JPG
Comment
Watch Question

Do more with

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

Commented:
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.

Commented:
Do you have IP forwarding enabled ?
IP Forwarding
SouljaSr.Net.Eng
Top Expert 2011

Commented:
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

Author

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

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

try and SOURCE NAT 192.168/16 networks to 10.0.0.100
if the address is 10.0.0.34 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 10.0.0.0/24 net
- 10.0.0.1 is the ISP NAT router/modem/firewall
- 10.0.0.2-10.0.0.254 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 10.0.0.1 (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