LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-29-2004, 10:22 AM   #1
pnh73
Member
 
Registered: Jul 2003
Location: Birmingham, UK
Distribution: Ubuntu,Debian
Posts: 381

Rep: Reputation: 30
Question 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,
 
Old 10-29-2004, 10:57 AM   #2
blish_blash
Member
 
Registered: Dec 2003
Posts: 68

Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help accessing the internet ubuntu_nig Ubuntu 6 10-07-2005 07:35 AM
Accessing the internet... TBomb Linux - Networking 7 07-24-2005 08:54 AM
Internet connection sharing and gateways andrewjjones Linux - Networking 29 10-29-2004 02:02 PM
routes, default gateways, ip's internet connecting - Much Stress mudelf Linux - Networking 2 09-29-2003 06:13 PM
Accessing the internet ruitao Linux - General 2 03-05-2003 06:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration