Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: gateway with one interface

From: Alan Chandler <alan(at)chandlerfamily.org.uk>
Date: Sun Oct 28 2007 - 03:16:04 EDT


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 debian-user-REQUEST@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Received on Sun Oct 28 03:15:27 2007

This archive was generated by hypermail 2.1.8 : Mon Feb 25 2008 - 12:14:42 EST


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library