RH9, NAT and routing

Bob Smith bob at netprt.com
Mon Jun 7 21:26:42 UTC 2004


I'm trying to set up my local network so that my RH9 box acts as a router
between my LAN and the Internet via a DSL connection.  The DSL connection
is solid and working, and I have no problems accessing the Web.  I think
that I set the operation up correctly, but it's not working, hence my yelp
for help...

The DSL modem is accessed via eth0, the LAN via eth1.  Traffic on either
side works well, and I have DNS working such that I can access DNS values
for sites not in my local DNS configuration throughout my LAN.  The
exterior network values are correct for the DSL connection and the
network connection values for the ISP.

I used the RHCE study manual as a guide, and did the following:

In IP tables, created a forwarding rule, as it appears in this excerpt
from the file:

*nat
-A POSTROUTING -s 192.168.1.0/24 -o eth0 -j MASQUERADE

In /etc/sysctl.conf, I turned on forwarding:
net.ipv4.ip_forward = 1

After reboot, the /proc/sys/net/ipv4/ip_forward file has a value of 1.

I set up ftp as recommended in the manual:

/sbin/modprobe -a ip_conntrack_ftp ip_nat_ftp

At this point, I can get any DNS query vi nslookup that I want, and get a
return value.  However, I cannot FTP out, I can't get out via web browser,
and ping returns "Request timed out."  Traffic within the LAN is fine, and
traffic up to the Internet is fine.

So, I'm thinking that I need some kind of either forwarding or routing
rule to be configured for one of the ethernet card interfaces to allow
forwarding.  I checked with Evi's Linux Sys Admin book, and I think the
routing rules are correct, but I'm not sure.

Any help would be appreciated.

Thanks,

-Bob





More information about the redhat-list mailing list