[Klug-general] Adsl Modem Connection

Alan at COMM-TECH alan at communitytechnology.org.uk
Mon May 8 02:30:44 BST 2006


These are the basic commands for interrogating the ethernet interfaces, 
getting dem to share internet on a network with no dhcp server.

On each computer ensure ethernet card is working:
#mii-tool
Will give an indication of status for most network cards, look at the 
output for the name of the card. Probably "eth0".
#ethtool eth0
will give much more detailed information on the card including duplex, 
speed, WOL, connection status.
#iwconfig eth0 192.168.1.10 up netmask 255.255.255.0
Sets the cards network address. Use 192.168.1.11 on the second computer
#iwconfig eth0 192.168.1.11 up netmask 255.255.255.0
Then
#ping 192.168.1.10 from the second
from computer 2 if you get replies, you are connected!

I asume then, you want one of them ( 192.168.1.10) to use the ADSL and 
share internet access with the rest of the network. First establish the 
name of the adsl network device. Usually "ppp0". Use these commandz to 
set up port forwarding:
#/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
#echo 1 > /proc/sys/net/Ipv4/ip_forward
(the directory differs slightly in diffent distros, but basically you 
need the ip_forward file)

Then on any other computers on the network, use:
#route add default gateway 192.168.1.10
You may need to set the DNS server on them. Use your ISPs nameserver, or:
#echo "nameserver 4.2.2.1" > /etc/resolv.conf

Alternatively you could wander round the gui network config dialogs 
getting mouse-ache, finding the boxes that fit the information above 
(except the iptables bit), pressing Apply and waiting around a lot. In 
the end you get the same job done.

I am new here so unsure if this article is of any use to anyone, if so 
let me know I will write a fuller one for the klug site.

Alan

PS: (This 4.2.2.1 is a public nameserver, I note it belongs to "level 3 
communications". Thats funny, Level 3 are owned by playboy magazine... 
whatever that means ;)

==================================================
Peter Apps wrote:
> Many thanks for your replies. The connection is due to be installed on
> Wednesday so I'm trying to be ready by then. 
>
> I did download the .gzip source files from EciAdsl but being lazy I'll
> try the FC4 .rpm file first. It is good to know I was on the  right
> track. I didn't realise Adsl was treated as an Ethernet connection
>
> I've been trying to set up an Ethernet card on my computer without much
> success as it keeps reporting a problem with the iptables. Most of the
> articles I read seem to be in a foreign language - Linuxese and the
> books I have seem to think I want to set up a multi-national network
> involving a few thousand terminals.
>
> I only want to connect a couple of machines  together. I sure it's easy
> - after the first time. 
>
> My first computer was CPM based (does anybody remember it?) so I don't
> mind working on the command line when I know what commands to use.
>
>
> _______________________________________________
> Kent mailing list
> Kent at mailman.lug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/kent
>   



More information about the Kent mailing list