IP Forwarding problem

From: David Suna (david_at_davidsconsultants.com)
Date: 04/26/04


Date: Mon, 26 Apr 2004 12:56:11 +0300

I am sure there is a simple fix to my problem but I have looked on the net
and I have not found it.

I have a RedHat 9 system set up. I am connecting to the Internet via an
ISDN modem. The connection works fine. I now want to have the Windows
boxes on the LAN connect to the Internet via the Linux box. I set up IP
Forwarding. I am able to see the Linux box from the Windows machines on
the network. However, I am not able to get out onto the Internet from the
Windows machines. I ran tcpdump and I see that the requests from the
Windows machine are going out but they are showing up as coming from
192.168.0.4 instead of as from the IP assigned from my ISP.

It seems like the NAT is not working but I don't know how to fix it. The
routing table seems to be OK. Below is what is reported by route -n:

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
62.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 ippp0
0.0.0.0 62.219.193.1 0.0.0.0 UG 0 0 0 ippp0

The RedHat 7.3 system that I had in the past that performed this function
used ipchains. RedHat 9 uses iptables. I don't know if the problem
relates to a bad configuration for iptables. I used the RedHat tool for
defining the iptables rules (Medium Security with the LAN as a trusted
interface). Below is what I get from iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
 
Chain FORWARD (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
 
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
 
Chain RH-Lokkit-0-50-INPUT (2 references)
target prot opt source destination
ACCEPT udp -- ntp.ilan.net.il anywhere udp spt:ntp dpt:ntp
ACCEPT udp -- ntp.ilan.net.il anywhere udp spt:ntp dpt:ntp
ACCEPT udp -- kd2.bezeqint.net anywhere udp spt:domain dpts:1025:65535
ACCEPT udp -- dnsmail2.bezeqint.net anywhere udp spt:domain dpts:1025:65535
ACCEPT all -- anywhere anywhere
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts:x11:6009 flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:xfs flags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable

Can someone tell me what I need to change to get the Windows machines to
see the Internet? Any pointers to documentation that addresses this
specific problem? I have read a bunch of documentation but I haven't
found a way to solve this problem.

thanks,
David Suna
david@davidsconsultants.com



Relevant Pages

  • Re: iptables
    ... I realised my post was more a 'help me debug my iptables' and all the pros ... Im happy the chain that accepts ssh is working as it should ... > What i cant seem to make work is the browsing of the internet. ... > # Take care of bad TCP packets that we don't want ...
    (comp.security.firewalls)
  • Re: How to update iptables to restrict LAN computer Internet?
    ... Firestarter firewall provides ipmasquerading for Internet ... iptables enough to do what I want. ... One command will append to the current iptables rules to ... This inserts the rule as the first entry in the FORWARD chain and will drop ...
    (comp.os.linux.networking)
  • iptables
    ... Im happy the chain that accepts ssh is working as it should be. ... What i cant seem to make work is the browsing of the internet. ... # Adds some iptables targets, ... # Take care of bad TCP packets that we don't want ...
    (comp.security.firewalls)
  • Re: How to force use of proxy?
    ... > this is the FORWARD chain, ... > firewall machine itself. ... > to allow Squid to retrieve the proxied pages from the Internet. ... > with iptables. ...
    (linux.redhat)
  • Re: firewall + mail gw
    ... > I've a home network connected to internet with an ADSL link, ... > users sharing two computers (windows machines). ... > I've already set up a linux firewall and it's running ok. ... L'art d'être tantôt très audacieux et tantôt très prudent est l'art de ...
    (Debian-User)