Re: Simple Routing with Redhat 9
From: Arsenio Lupin (lupiniii__SPAMMERDIMERXX_at_hotmail.com)
Date: 11/14/03
- Next message: Gilles Auric: "omni 56K USB how to"
- Previous message: Roland Leurs: "Re: flash player not working in Fedora"
- In reply to: Jimbo Johnes: "Simple Routing with Redhat 9"
- Next in thread: Steve: "Re: Simple Routing with Redhat 9"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 14 Nov 2003 08:21:57 GMT
Jimbo Johnes in 770b1f11.0311131154.28da6136@posting.google.com 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
- Next message: Gilles Auric: "omni 56K USB how to"
- Previous message: Roland Leurs: "Re: flash player not working in Fedora"
- In reply to: Jimbo Johnes: "Simple Routing with Redhat 9"
- Next in thread: Steve: "Re: Simple Routing with Redhat 9"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|