On Mon, 2002-02-04 at 20:15, Welby McRoberts wrote:
> Hello,
> 
> I've just gone out and bought some wireless networking kit, 2pcmica card + 1
> external antena.
> 
> i currently have a wired lan and i'm wanting to set up a laptop to act as a
> thing that routes the trafic to or from the wirlesslan
> 
> wireless lan <--> wired lan
> 
> On the wired lan i currently have NAT access to the internet and i would
> like all of the wireless lan to be able to access the internet using NAT.
> 
> could someone please help me on how to set this up?
> ( i would like to have xwindows on the laptop that is connected to both the
> wired and the wireless lans)
> 

OK... Here goes...

This assumes the following...

Your machine which NAT's for the network is 192.168.10.254, you 
mentioned it is already NAT'ing so i'll assume that you have configured
it to do all that already, and that it is also a dns server for your
network

Your laptop has a basic install of Linux and runs X windows already, has
a wireless lan card (192.168.100.1) eth1 and a normal ethernet card
(192.168.10.1) Eth0 both of which are detected and working on  their
subnets

You have a windows machine on the wireless network 192.168.100.10

You have a Linux machine on  the wireless network 192.168.100.20

First off you need to set up your laptop to forward data between the two
networks

todo this you need to make sure that you set iptables to allow it - 

iptables -P FORWARD ACCEPT # Sets the default policy for forwarding to
accept

echo "1" > /proc/sys/net/ipv4/ip_forward   #enables forwarding

you then need to make sure that your laptop has a default route  set
properly
so we then add an  entry to the routing table

route add 192.168.10.254 default gw #sets the default route

we then set up dns on the laptop

echo "nameserver 192.168.10.254" >> /etc/resolve.conf

you should now be able to ping www.yahoo.com from your laptop

now, from you linux box on your wireless network....

you need to set the route up  bearing in mind there are two steps to
getting to the internet, 1) you need to cross over to the wired  network
which is on a different subnet, 2) you then need to go to the nat
gateway

route add -net 192.168.10.0 netmask 255.255.255.0 gw 192.168.100.1
#sets up a route to the wired network
route add 192.168.10.254 default gw 
#sets up the default route
#you then want to add the dns entry
echo "nameserver 192.168.10.254" >> /etc/resolve.conf

you should now be  able to ping www.yahoo.com from your linux box on
your wireless lan, appologies if you can't


>From your windows box, assuming your wireless network card was detected
as a network card and  not a fridge freezer, toaster or other household
hardware,  and now has  an ip address and can ping other machines on
your wireless network....


goto control panel, open up network, chose the tcp virtual device for
your wireless lan card click properties,


click gateway

add 192.168.100.1
add 192.168.10.254

click dns config

you will need to add a  dns name for your machine iirc (ymmv its been
awhile since i configured networking under windows) 

add 192.168.10.254 as a dns server
click ok, 

restart
and you should be able to surf the net, this is of course assuming that
you did not reconfigure when there is a full moon or any occult
festivals happening, the weather was dry, with a clear sky, you were
facing east, and did so standing on  your head.

Ahem.

Anyway thats probably one way to do it, if it doesnt work, sorry for
leading you up the garden path.

You may also consider making your laptop an ethernet bridge which can be
described by the ethernet bridge howto a la linuxdoc.org

HTH

David











--------------------------------------------------------------------
http://www.lug.org.uk                   http://www.linuxportal.co.uk
http://www.linuxjob.co.uk               http://www.linuxshop.co.uk
--------------------------------------------------------------------

Reply via email to