On Sunday 28 Oct 2007, meekaaku kaaku wrote: > hi, > > I have a small LAN with about 3 windows machiens, 1 debian server > (etch), and adsl router with 4 ports. > Currently, I am using the router as a gateway (192.168.0.1), and the > debian server is 192.168.0.254. The client machiens are configured to > use 192.168.0.1 as a gateway. > > What i need to do is to use the linux server 192.168.0.254 as a > gateway for all the client machines, thereby i can monitor traffic > and gives me more control. But the problem is the debian machine has > only one interface and it is not directly connected to internet. It > is also using the router as the gateway to internet (just like the > other client machines). > > So my question is, can this be done? if so any pointers is > appreciated. I have checked routing/iptables info on the web, but in > all the cases, the linux machine is directly connected to the net and > has two interfaces.
Why don't you declare two interfaces on the one interface of your machine in /etc/network/interfaces iface eth0 inet static address 192.168.1.254 netmask 255.255.255.0 (and possibly something like this) pre-up /etc/firewall $IFACE pre-up echo 1 > /proc/sys/net/ipv4/ip_forward iface eth0:0 inet static address 192.168.0.1 netmask 255.255.255.0 (and possibly - but I am not sure) gateway 192.168.1.254 and reprogram your router to sit on the 192.168.1 subnet -- Alan Chandler http://www.chandlerfamily.org.uk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]