Jump to content

Shared internet using pppd


ianw1974
 Share

Recommended Posts

Since I'm in the middle of moving into my new house, I don't have internet at the old home now cos we cancelled the contract. So for now, my internet is via mobile internet using a USB adaptor that I connect to my machine.

 

I can then dial up using pppd and connect to the internet. Problem is, I was trying to get internet sharing using eth0 on the machine, so that a few other machines could all access the internet at the same time. However, as soon as I active pppd, it effectively kills eth0. I can still see it has an IP address, but I cannot ping anywhere to any other machines on my internal network. Has anyone done internet sharing using pppd as the internet connection? And if so, how did you get around this problem? Or is it just me :)

Link to comment
Share on other sites

  • 3 weeks later...

I am looking to do something like that. When not at home I'll be connected to the Internet through usb and my mobile phone. I would like to connect a VoIP phone adapter to my laptop computer's Ethernet port. I saw a post here that's marked "solved". Someone there must know how to get the job done.

 

I have only one Ethernet port in my computer. When at home I want to connect an Ethernet switch to the Ethernet port and use the same physical port for two different subnets, one subnet to connect to the broadband modem, and the other to connect to a VoIP phone and another computer on my LAN. I know this can be done but I'm not sure how to do it.

Edited by boatman9
Link to comment
Share on other sites

I don't know why you can't ping your local network anymore, that shouldn't be the case. Check the routing table (route -n) to see if you still have the route for the local network and check your firewall rules if you use one.

To enable shared internet you need to activete masquerading for your local network, this will do it:

 

/sbin/iptables -t nat -F

/sbin/iptables -t nat -A POSTROUTING -s 192.168.0.0/24 -o ppp0 -j MASQUERADE

 

replace "192.168.0.0/24" with the network address of your local network.

 

You also need to enable IP forwarding.

 

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

 

(or add 'net.ipv4.ip_forward = 1' into /etc/sysctl.conf, at least on Redhat/Suse/Mandriva systems).

 

All this can be done with a GUI on some distros too, for example on Mandriva in the MCC (configure your computer), in the 'Network & Internet' section there is 'Share the Internet connection with other local machines'.

Link to comment
Share on other sites

I'll have to check it out, no firewall was enabled, ip routing was enabled, but from my laptop where I had both the LAN and ppp connection running, it was weird. Have to see if the iptables bit helps it out.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...