Running iptables behind router

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, I have some problems setting up iptables on a linux box, acting as a
router between two networks. I have an internet connection through a
hardware router, which I have no access to. This router uses NAT, and
has an interface on 192.168.1.1. So far I've had my LAN on
192.168.1.0/24, with no problems, but would like to split it into two
LANs, one on 192.168.1.0/24, having the hardware router and some hosts,
and another one on 192.168.2.0/24, acting as an "internal" LAN.

I'd then like to connect these two LANs with a linux box running
iptables, so the both LANs have access to the internet through the
hardware router.

I sat up the iptables machine (which have two NICs) to the IPs
192.168.1.100 and 192.168.2.100, one on each interface. How should I set
up iptables, so the 192.168.2.0/24 range have access through iptables,
and further through the hardware router onto the internet? Only outbound
connections will be made. (Inbound connections are mapped in the
hardware router to 192.168.1.x to specific hosts, no problem there).

The computers on the 192.168.2.0/24 range should be able to make
connections to the 192.168.1.0/24 range, but not the other way around.

Any help is appreciated.

--
Kean Pedersen


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux