[Blackburn] Networking

steve at localcomputer.co.uk steve at localcomputer.co.uk
Sun May 25 22:23:01 BST 2003


> I've been trying to set up a network today. That works and the
> computers on it can ping each-other. However, I don't know how to get
> the internet shared amoung the computers. 

The simplest way probably is to setup NAT (aka IP Masquerading) on the
gateway machine.

You will have to tell me whether you are using kernel 2.2 or 2.4 because the
commands for NAT are completely different.

> A computer (192.168.3.9) is
> connected to the internet using a dailup connection. It can use this
> connection, but 192.168.3.11 (the other computer) cant.

I will assume you meant 192.168.3.10 here.....


> They are both
> Debian Woody boxes. I think 192.168.3.9 is configured to be a
> gateway: is this what it should be? 

Yes. Your 192.168.3.9 machine should be setup to perform NAT, and routing
should be enabled on it.
Then your other machine(s) should be configured with 192.168.3.9 as the
default gateway.


> If I try to ping something on the
> internet on 192.168.3.10, it cant resolve the domain name. 

Don't worry about domain names or hostnames for now.
You must try to ping a numeric IP address on the Internet. Try 158.52.1.204


> If I give
> it an IP address to ping, 192.168.3.9 seems to send out the address
> 192.168.3.10 as the pinging computer's IP, rather than its own (if I
> understand the output form tcpdump correctly). 

It looks like you have enabled routing, but not enabled NAT.


> Please could someone help. Should I be using squid? If so, how do I
> set it up? 

You could use squid instead of setting up NAT. It should be just a case of
running the squid daemon, if the default configuration file is sane. Squid
will just give you HTTP connections - nothing else, not even ping!

If you decide to setup NAT (which gives all of these) then I would suggest
you leave squid for another day, after you have everything working without
squid.



> Also, is it possible to run a program in X as root, when logged in as
> a normal user?

The command 'su' will turn any shell into a root shell. You will need root's
password. For a genuine root environment, you should run 'su -'.


> P.S. I attatch the outputs of route and ifconfig in case they
> are of use. ifconfig on 192.168.3.9:

That is all fine.

> route on 192.168.3.9:
> 
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref   
> Use Iface www.birminghamc *               255.255.255.255 UH    0 0  
> 0 lo fruitbat.lns.bi *               255.255.255.255 UH    0 0       
> 0 ppp0 192.168.3.0     *               255.255.255.0   U     0 0     
> 0 eth0 default         fruitbat.lns.bi 0.0.0.0         UG    0 0     
> 0 ppp0 

That is a bit messed up :-)

Can you send the output of 'route -n' and also the contents of '/etc/hosts'
(which should be almost empty)?


> ifconfig on 192.168.3.10:

That is fine.

> route on 192.168.3.9:

???? You mean 192.168.3.10


> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref   
> Use Iface 192.168.3.0     *               255.255.255.0   U     0 0  
> 0 eth0 127.0.0.0       *               255.0.0.0       U     0 0     
> 0 lo default         192.168.3.9     0.0.0.0         UG    0 0       
> 0 eth0 

Messed up. Again, send the output of 'route -n' and also the contents of
'/etc/hosts'.


> I've set the hostname (I think) to birminghamcounrtyclub.org

Why? That domain name is not even registered apparently.


I look forward to understanding what is going on here :-)

Steve





More information about the Blackburn mailing list