LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Accessing internet through 2 gateways? (https://www.linuxquestions.org/questions/linux-networking-3/accessing-internet-through-2-gateways-248760/)

pnh73 10-29-2004 10:22 AM

Accessing internet through 2 gateways?
 
Hi,

I am trying to get a linux server to act as a router to pass traffic through to my actual ADSL router so that I can access the internet from it. A diagram of the topology goes something like:


My PC (192.168.2.2) Server (eth0 - 192.168.1.13)----------> ADSL Router (192.168.1.1)
^-------------------(eth1 - 192.168.2.1 )

I have gotten the Server to pass local network traffic, so I can get from 192.168.2.2 to 192.168.1.4 for example, but I can't get to the internet, whereas I can get from 192.168.1.13 to the internet. How do i get 'My PC' to get access to the internet? I have used masquerading to get this fair and am stuck as to where to go next.

Thanks for all you help in advance,

blish_blash 10-29-2004 10:57 AM

Hi -

You have to tell your router how to find the 192.168.2 subnet - thus - make a route to this subnet with the server as gateway (normally through the router's http admin interface).

I had a similar problem with a netgear router, which was configured to support 192.168.1 subnet, but was not able to support more than one subnet on the LAN side.

What I did was changing the netmask of the router subnet to 255.255.0.0 - so it supports all 192.168 subnets and sees them as one.
You still have to set a route to your server though.

Hope that helps...
Cheers,
Ron


All times are GMT -5. The time now is 01:08 AM.