TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iptables woes



Hey all, I am setting up a new NAT / Packet FIlter box and am having probs
with iptables.

I am using 2.4.0-test5 and iptables version 1.1.1
I can masqerade fine it seems as I can surf and connect to remote machines but
am having probles with forwarding incomming packets.

I do the following from an init script

#---- start init script
modprobe iptable_nat
echo 1 > /proc/sys/net/ipv4/ip_forward


### 
# Try making the NAT Table
iptables -N nat

###
# Flush
iptables -F
#####
# Start the NAT Stuff
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

##
# Test port forwarding.
iptables -A PREROUTING -t nat -p tcp -d 208.210.145.140 --dport 110 \
        -j DNAT --to 10.0.1.2:110

#--- End script

once I exec this script I do a 
$iptables -L FORWARD 

and get
Chain FORWARD (policy ACCEPT)
target     prot opt source               destination 

Which tells me that there are no entries in that chain. Which is odd as you
can see there is clearly an entry in iptables init script that makes one.

Any help you guys could provide would be greatly appreciated.


Am I missing something?

-- 
Ben Lutgens  Work: 612.379.5941 Cell: 651.387.9065  Home: 651.703.9541
Systems Administrator Sistina Software Inc. http://www.globalfilesystem.org/
------------------------------------------------------------------------------