Re: Simple Routing with Redhat 9

From: Arsenio Lupin (lupiniii__SPAMMERDIMERXX_at_hotmail.com)
Date: 11/14/03


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


Relevant Pages

  • Re: Simple Routing with Redhat 9
    ... > My objective is to set up a simple firewall using iptables using RH9 ... one NIC with the modem and the public ip - 64.138.38.41 ... than you need to setup your clients with the range of the internal lan ...
    (linux.redhat.misc)
  • Re: Simple Routing with Redhat 9
    ... > My objective is to set up a simple firewall using iptables using RH9 ... one NIC with the modem and the public ip - 64.138.38.41 ... than you need to setup your clients with the range of the internal lan ...
    (comp.os.linux.networking)
  • Re: Simple Routing with Redhat 9
    ... > My objective is to set up a simple firewall using iptables using RH9 ... one NIC with the modem and the public ip - 64.138.38.41 ... than you need to setup your clients with the range of the internal lan ...
    (linux.redhat.install)
  • Re: Need help with iptables/nat
    ... :) Since most clients get an ip dynamically, ... > The setup and more details of the issue are posted here: ... > I'm using a very simple iptables script to begin with. ... that do not manage to get an IP from a DHCP Server use IPs ...
    (comp.os.linux.networking)
  • RE: A question about a basic security setup...
    ... A question about a basic security setup... ... > I was thinking of running iptables on the dual homed host, ... What you are looking for here, is an "application proxy" type firewall. ...
    (Security-Basics)