Quantcast
Channel: General Networking
Viewing all articles
Browse latest Browse all 27527

Static routing with linux

$
0
0

Hey Guys got a question,

I'm just playing around with a virtual lab and my goal was to route between one virtual network, and my physical network which has a gateway out to the internet.

I created 1 windows server and 1 linux machine with two interfaces - one on the virtual network 192.168.188.0 and another interface on my physical network 192.168.1.0

I enabled IP forwarding on the linux box and I created a default route stating - if your destination is for the 192.168.1.0 network - route those ips thru my eth1 gateway of 192.168.1.9 (just the static ip of the interface I made)

This works great, I can now ping any machine on the 192.168.1.0 network from my 192.168.188.0 network without an issue. However I'm a little confused about how I can give my 192.168.188.0 network access to the internet? What would I have to set my static route too on the linux machine that acts as a portal to the 192.168.1.0 network where the internet gateway (real isp router) 192.168.1.100 sits.

Basically I want to say - hey ANY packets coming in from interface 192.168.188.9(the virtual gateway on the virtual network) route to my physical internet gateway of 192.168.1.100 - is this possible? Am I thinking about this correctly? This almost looks like a default route only it's using a intermediate virtual gateway to get to the physical gateway on 192.168.1.0 - I'm a little confused!


Viewing all articles
Browse latest Browse all 27527

Trending Articles