LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 05-10-2003, 03:36 AM   #1
l0f33t
Member
 
Registered: May 2003
Location: Washington State
Distribution: Gentoo
Posts: 145

Rep: Reputation: 15
Internet Connection Sharing via ppp


Hello World,

Wow!! Linux is quite the steep learning curve. Very challenging.
Short story that might help before I get to the meat and potatoes.Spent a days worth of reading on just trouble shooting my external hardware modem connection to get internet access and wanted to scream. But I spent 40 bucks for this modem and linux talks to the modem just fine. For what ever reason I kept getting "NO DIAL TONE" everytime I tried to dialout. AHHHHHHH... Use my girlfriends hardware modem and every thing worked fine. Finally I decided to use google and search after trying to go through the "pppd help" and other useful local linux docs.
All that I needed to do was change my "Dial String" from:
ATDT to ATX3DT. I believe ATXDT worked as well. So I basically got schooled in the Hayes modem commands and what there used for. Nothing like going from Windowsd to Linuxd. Its like going from driving and Automatic to a Stickshift overnight. That actually sounds allot easier than what we go through just to get the internet up and running. Anyways.........

On to the meat and potatoes now.
I've read through quite a few of the threads dealing with internet connection sharing and still I'm confused. So hopefully someone can point in the correct direction and then I can take it from there.

This seems easy to me, but then again so was setting up a simple modem. DOHP...
2 pc's. 1 linux box, 1 Win98 box. Just want the Win98 box to gateway through the linux box and use the linux boxes modem connection for internet access.

I have Mandrake 9.0 installed on the PC that connects to the internet via dialup/ppp, with a external hardware modem being used. This now works just fine.

I get the same DNS addresses each time.
I have one network card that I configured when linux was first configured but always uses the modem for internet access.
IP: 192.168.253.2/24
DG: "Don't have one" but assigned one anyways of 192.168.253.1. Not sure if this was needed just to have something there or not. If not please let me know?

I ran the ICS gui wizard and it installed dhcp from what I gather and this is where I have no idea what happened. My regular internet connection ceased to exist after this.

I figured out how to bring down eth0 and the I was able to dialout again. I would like to share the internet connection but just wanted to know if this is the correct path and what am possibly missing and what steps to trouble shoot.
Any help is greatly appreaciated.

Thanks.
 
Old 05-10-2003, 04:33 AM   #2
born4linux
Senior Member
 
Registered: Sep 2002
Location: Philippines
Distribution: Slackware, RHEL&variants, AIX, SuSE
Posts: 1,127

Rep: Reputation: 49
the default gateway for your client machines should be the ip address of your linux machine (the one with the dialup connection). and for ur linuc machine, the gateway should be the ip address of ppp0 (or what ever dialup interfece you have). verifty that via 'route -n'.

here is a page that can help u with ip masq'ng basics:

http://www.yolinux.com/TUTORIALS/Lin...rkGateway.html

post back if u still have questions.

hth.
 
Old 05-10-2003, 08:02 AM   #3
l0f33t
Member
 
Registered: May 2003
Location: Washington State
Distribution: Gentoo
Posts: 145

Original Poster
Rep: Reputation: 15
Hello Born,

Thanks for the reply.
Just to make sure that we're on the same page of music, I've already ran the ICS




GUI wizard on the linux pc that will be acting as the internet gateway for the
other machine.
Itlooks as though this installed Bind,Shorewall firewall, and DHCP.

I've decided to use another Linux box acting as the DHCP client. It is in fact
getting an address of 192.168.1.252/24 with a default route that points to
192.168.1.1, (where is the mysterious 192.168.1.1 coming from?

As a newbian this seems strange because the network that my ethernet adapter
is assisgned 192.168.111.2/24 on the linux pc acting as the internet
gateway.Going to put this on the 192.168.1.0/24 network now, as was mentioned
earlier so that both nic cards are on the same network.

Assigning new address of 192.168.1.50/24 with a DG of 192.168.1.1 and see if I
can at a minimum get ping connectivity.
......
Ok I can ping by ip between both machines now via the private ip addressing. I
can even
ping all the way to my PPP0 adapters host address but not beyond.

Here's the current setup.

(Linux internet gateway PC with ICS enabled and running.)


eth0 Link encap:Ethernet HWaddr 00:A0:CC3E:3A
inet addr:192.168.1.50 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1169 errors:5 dropped:0 overruns:0 frame:0
TX packets:125 errors:736 dropped:0 overruns:0 carrier:1462
collisions:0 txqueuelen:100
RX bytes:86634 (84.6 Kb) TX bytes:12722 (12.4 Kb)
Interrupt:5 Base address:0xa400

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:1780 errors:0 dropped:0 overruns:0 frame:0
TX packets:1780 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:179016 (174.8 Kb) TX bytes:179016 (174.8 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:63.187.233.179 P-t-P:63.187.254.9 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1524 Metric:1
RX packets:69 errors:0 dropped:0 overruns:0 frame:0
TX packets:84 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:36017 (35.1 Kb) TX bytes:7011 (6.8 Kb)

[root@localhost etc]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
sdn-ap-005watac * 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 * 255.255.255.0 U 0 0 0 eth0
127.0.0.0 * 255.0.0.0 U 0 0 0 lo
default sdn-ap-005watac 0.0.0.0 UG 0 0 0 ppp0
[root@localhost etc]# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
63.187.254.9 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 63.187.254.9 0.0.0.0 UG 0 0 0 ppp0

[root@localhost etc]# cat resolv.conf
domain localdomain #kppp temp entry
# # search localdomain #entry disabled by kppp
# search localdomain #entry disabled by kppp
# nameserver 192.168.253.2
nameserver 207.217.120.83
nameserver 207.217.77.82
nameserver 127.0.0.1


# ppp temp entry
nameserver 207.217.120.83 #kppp temp entry
nameserver 207.217.77.82 #kppp temp entry
nameserver 206.134.133.10 # ppp temp entry
nameserver 206.134.224.5 # ppp temp entry

When I do the same on the linux pc acting as the dhcp client
I'm using dhcp and pointing to 192.168.1.1 for my default gateway and all is
well until i try and route past my
eth0 interface address out to the internet. As well the resolv.conf file dosn't
have my isp's dns server ip's listed either. When I manually add them it doesn't
help either..

This machine has a default gateway that is pointing to 192.168.1.1. I get good
ping
replies by ip all the way up to the ISP assigned ip and then it doesn't route
past that by ip or by name.

One thing that also gets me is that it seems like everytime I have Eth0 up and
then attemtp to dialup it makes to connection to the ISP but doesn't route any
dns. I have to manually shut down if-eth0 and then restart the PPP connection
again. Thanks for all of the help. I will look over the link that you sent
furhter. Thanks you. Seems to be still a routing issue at this point.

Thanks again your help.
 
Old 05-10-2003, 09:53 PM   #4
Sutekh
Member
 
Registered: Apr 2002
Location: Melbourne, Australia
Distribution: Gentoo
Posts: 273

Rep: Reputation: 30
Quote:
Originally posted by l0f33t

I've decided to use another Linux box acting as the DHCP client. It is in fact
getting an address of 192.168.1.252/24 with a default route that points to
192.168.1.1, (where is the mysterious 192.168.1.1 coming from?
the dhcp server sends the client an ip address, gateway, dns addresses, wins server address, etc. so the machine acting as the dhcp server will have a /etc/dhcpd.conf (or something similar depending on the version of dhcp server you are running) with these details in it. Simply change this to something appropriate for your network.

if you run winipcfg on the windows box it will tell you the address of the dhcp server.

Quote:
As a newbian this seems strange because the network that my ethernet adapter is assisgned 192.168.111.2/24 on the linux pc acting as the internet
gateway.Going to put this on the 192.168.1.0/24 network now, as was mentioned earlier so that both nic cards are on the same network.
it may be easier to setup a dhcp server on the linux box so you have more control over this, this would mean disabling the existing server however wheerever this may be.

Quote:
Assigning new address of 192.168.1.50/24 with a DG of 192.168.1.1 and see if I can at a minimum get ping connectivity.
......
Ok I can ping by ip between both machines now via the private ip addressing. I can even ping all the way to my PPP0 adapters host address but not beyond.
ok if you can ping as far as the ppp0 address then you are ready to install a firewall to eanable sharing of this connection.

check out http://www.netfilter.org/documentati...g-HOWTO-5.html
Quote:
When I do the same on the linux pc acting as the dhcp client
I'm using dhcp and pointing to 192.168.1.1 for my default gateway and all is well until i try and route past my eth0 interface address out to the internet. As well the resolv.conf file dosn't have my isp's dns server ip's listed either. When I manually add them it doesn't help either..
you need to change those dhcp server settings as mentioned above. Once you have that done setup the firewall as described by the link and type

echo 1 > /proc/sys/net/ipv4/ip_forward

and you should be able to get connected

Quote:
This machine has a default gateway that is pointing to 192.168.1.1. I get good ping replies by ip all the way up to the ISP assigned ip and then it doesn't route past that by ip or by name.

One thing that also gets me is that it seems like everytime I have Eth0 up and then attemtp to dialup it makes to connection to the ISP but doesn't route any dns. I have to manually shut down if-eth0 and then restart the PPP connection again.
check out your /etc/sysconfig/network-scripts/if-* scripts to see what they ar edoing by default. Ideally you probably want to set sverything up to DHCP and run the dhcp server off the linux box.

What is probably happening is that the eth0 card is setting a defalult gateway and then the the ppp0 is setting another default gateway giving you two. The eth0 card does not need to set a seperate default gateway.
 
Old 05-22-2003, 05:01 PM   #5
l0f33t
Member
 
Registered: May 2003
Location: Washington State
Distribution: Gentoo
Posts: 145

Original Poster
Rep: Reputation: 15
Talking Internet Connection Sharing via ppp

Finally. I got internet connection sharing up and running successfully with 2 linux machines and 1 windows 98 machine sharing our meager 56K dialup connection.

I uninstalled the shorewall version that came with Mandrake 9.0 Distro.Downloaded version 1.4.3-1noarch.rpm,went back through the "Internet Connection sharing Wizard", removed the "startup_disabled" file from /etc/shorewall directory, cd'ed to /sbin and issued "shorewall start" command. I made sure that all machines had ping connectivity between themselves and then out to the internet.

The two linux machines where using DHCP and the windows 98 machine was statically ip'ed.

Now on to configuring DNS caching server...WooHoo..


All is good.

Linux is no joke and demands that I have allot of patients.

Thanks to all that replied.

 
  


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
internet connection sharing fatrandy13 Linux - Networking 2 05-11-2005 11:35 PM
Internet sharing routing issues via PPP crocks21 Linux - Networking 9 12-07-2004 09:36 PM
Why don't file and print sharing of Samba pass throgh PPP connection? ritsasa Linux - Networking 1 03-08-2004 07:35 AM
ppp server sharing internet? h8r Linux - Networking 0 11-08-2003 06:37 PM
Internet Connection Sharing quozt Linux - General 7 09-08-2003 09:06 PM


All times are GMT -5. The time now is 04:24 AM.

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 Google+: linuxquestions
Open Source Consulting | Domain Registration