LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
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
 
LinkBack Search this Thread
Old 01-25-2006, 12:42 PM   #1
axelfc
Member
 
Registered: Jan 2006
Distribution: ArchLinux
Posts: 174

Rep: Reputation: 34
Internet Connection Sharing and Routing Troubleshooting


Here h**p://egnatia.ee.auth.gr/~adns/myLan.JPG you can see an image of my lan in order to make it easier to explain how it is set.

I have 3 computers connected with a switch. Each one of them has one ethernet card.

pc A
OS: Win 98SE
ip: 10.102.0.33
subnet mask: 255.255.255.192
gateway: 10.102.0.1

pc B
OS: Win XP sP2
ip: 10.102.0.32
subnet mask: 255.255.255.192
gateway: 10.102.0.1

pc C
OS: FC3
ip: 10.102.0.31
subnet mask: 255.255.255.192
gateway: 10.102.0.1

On the switch i have also connected a dlink 810+ wireless access point ethernet to bridge device

ip: 10.102.0.30
subnet mask: 255.255.255.192
gateway: 10.102.0.1

which connects my lan to another lan. Also on the gateway 10.102.0.1 there are and other computers connected with ips like 10.102.0.x same subnet mask ang gateway.

Now in pc C i have establised a pptp vpn connection with a computer with 10.106.3.1 ip from which i get access on the internet (10.106.3.1 is a pc located on the "Other Network").

My problem is that i want to share this internet connection to pcA and pcB. I don't want to change ips and gateway on these 2 pcs since i want them to have access on the 'Other Network" as well as on the internet, which means that i can't put pcC gateway for pcA and pcB. In order to achieve this on pcC i have made a file named route-eth0 which contains the following line

Code:
#! /bin/bash
10.0.0.0/8 via 10.102.0.1
and placed it in /etc/sysconfig/network-scripts

Moreover i don't want other pcs such as 10.102.0.5 (and all others generally) to have access on my shared internet connection. I tried squid proxy server on pc C but there were problems with some programms that didn't have an option to connect on the internet through a proxy. Furthermore i couldn't set up mirc on pcA and pcB correctly in order to connect on the internet through squid proxy since squid doesn't support socks5 onnections (or i think so).

Finaly i would like to control the bandwith used by pcA and pcB but first things first.

Does anyone have any idea on how to solve this apart from using a different programm for socks server and a different one for http server? (I couldn't find a programma that works simultaneously as a socks and http server).
 
Old 01-26-2006, 08:23 AM   #2
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: SuSe 9.2 & 10, Gentoo, knoppix, DSL
Posts: 769

Rep: Reputation: 101Reputation: 101
Change the default gateway on PCA and B to PCC, and add a static route onto PC A and B for the other network whatever it may be. If the other network is say 172.16.2.x then add a static route to A & B for 172.16.2.0 255.255.255.0 via whatever the gateway is, I assume 10.102.0.1 looking at your diagram. Remember your HOSTs are not just limited to a default gateway. They can have other routes on them as well. In actual fact just put the following static routes on A & B -
10.0.0.0 255.0.0.0, 172.16.0.0 255.240.0.0, and 192.168.0.0 255.255.0.0. That should cover all the bases unless your 'other' network is not in the reserved ranges, but thats another problem altogether.
 
Old 01-27-2006, 05:00 AM   #3
axelfc
Member
 
Registered: Jan 2006
Distribution: ArchLinux
Posts: 174

Original Poster
Rep: Reputation: 34
baldy3105 thanks for the answer. =)

The other network has ips of the range of 10.x.x.x.

I changed the default gateway on pcA and pcB to pcC and added a static route on those two of the form 'route add -p 10.0.0.0 255.0.0.0 mask 10.1020.1. I thought that according to what you said this would redirect all traffic for 10.x.x.x ips through getway 10.102.0.1. However now these 2 computers don't have access on the other network no matter if pcC is on or off.

I didn't try the internet connection since i have to solve this.
 
Old 01-27-2006, 07:57 AM   #4
baldy3105
Member
 
Registered: Jan 2003
Location: Cambridgeshire, UK
Distribution: SuSe 9.2 & 10, Gentoo, knoppix, DSL
Posts: 769

Rep: Reputation: 101Reputation: 101
On PC A and B only 'route' should show (assuming a /24 local mask)-

10.102.0.0 netmask 255.255.255.0 via eth0
10.0.0.0 netmask 255.0.0.0 via 10.102.0.1
0.0.0.0 (default) netmask 0.0.0.0 via 10.102.0.31

This should work. The routes are matched in order of how specific they are.
10.102. anything will be sent locally as its the connected network.

10. anything else will go to 10.102.0.1 for routing
all other traffic will get sent to 10.102.0.31

Check your routing table is correct and try using traceroute to see where the actual next hop is in each case.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Troubleshooting Internet connection hussar Linux - Networking 3 12-05-2005 01:43 PM
routing problems with internet/print sharing blue.spark Linux - Networking 0 04-25-2005 01:02 PM
2 Internet Connection Routing Question SubtleD Linux - Networking 5 02-10-2005 09:20 PM
Internet sharing routing issues via PPP crocks21 Linux - Networking 9 12-07-2004 09:36 PM
Internet Connection Routing? MythX Linux - Networking 1 10-20-2003 09:00 PM


All times are GMT -5. The time now is 02:29 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration