Sharing dialup connection over network cable

Guido Heumann listguido at web.de
Thu Aug 18 17:43:59 UTC 2005


Bob Nielsen schrieb:
> On Thu, Aug 18, 2005 at 10:02:15AM -0400, Steve wrote:
> 
>>Hi,
>>
>>Can someone let me know what I need to do in order to share my dialup 
>>connection?
>>
>>When connected to dialup, I want to run a network cable from my computer's 
>>ethernet to another computer (no router). Is this possible? What kind of 
>>cable do I need to get? How do I set this up in Ubuntu/Gnome?
>>
>>Any help would be appreciated. Thanks in advance!
> 
> 
> You will need a crossover cable if you aren't using a switch, hub or 
> router.

Right. And to share a network connection you need basiclly the following 
steps:

- activate IP forwarding on the dialup machine
- configure iptables with masquerading on the dialup machine
- set the LAN IP address of the dialup machine as the default gateway on 
the second computer

the first can be done temporarily with
echo "1" > /proc/sys/net/ipv4/ip_forward

but this will be lost on the next reboot. You can edit 
/etc/network/options to have it last permanently.

For the iptables masquerading I'm sure you'll find some example scripts 
with google, if noone else on this list will jump in.

hope that helps,
Guido





More information about the ubuntu-users mailing list