Jimbo Johnes in
(E-Mail Removed) magna cum
audacia dixit:
[zac]
> My objective is to set up a simple firewall using iptables using RH9
> as my gateway. I have 8 ip addresses [5 usable] starting from
> 64.138.38.42 - 46.
> .41 is the ip address of the modem. .47 is the broadcast ip.
> I have 2 NICs eth0[external] -64.138.38.42 and 64.138.38.45; gateway =
> .41
Why have you set up your LAN with public ip?
I probably would have done this way:
- one NIC with the modem and the public ip - 64.138.38.41
- the second NIC with private ip connected to the hub (i presume) -
192.168.0.1
than you need to setup your clients with the range of the internal lan
192.168.0.[2;255] same subnet.
setup your clients with default gateway=192.168.0.1 then the DNS=your_dns.
Now on the server enable ipforward and NAT and MASQUERADE pkts outgoing from
modem with a script at startup that could be:
##################################
echo 1 > /proc/sys/net/ipv4/ip_forward
# Variables
IF_WITH_MODEM =eth0
iptables -F
iptables -X
iptables -t nat -A POSTROUTING -o $IF_WITH_MODEM -j MASQUERADE
iptables -A INPUT -i $IF_WITH_MODEM -p tcp --syn -j DROP
###################################
Hope this help.
Bye!
--
>>>>>>>>>>>>>>><<<<<<<<<<<<<<<
Arsenio Lupin