how to migrate the iptables from RedHat to FedoraCore4

From: nick (i141802596_at_yahoo.com)
Date: 11/21/05


Date: Mon, 21 Nov 2005 22:47:41 +0800

the follow rules is work in RedHat9, but when i put it in FedoraCore4
,some errors occur, so how to solve these problems?
thanks!

###############################################################
### Define interfaces here
INT_DEV=eth0
EXT_DEV=ppp0
INT_NET=192.168.1.0/24

### Loading firewall modules
modprobe ip_conntrack
modprobe ip_conntrack_ftp

###############################################################
### Enable Packet Forwarding
echo 1 > /proc/sys/net/ipv4/ip_forward

### Remove all previous rules, and delete any user defined chains
iptables -F
iptables -X
iptables -t nat -F

iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
iptables -A INPUT -i lo -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1 -p tcp --dport 3389 -j ACCEPT
iptables -A INPUT -i eth1 -s 192.168.0.0/24 -j ACCEPT
iptables -A FORWARD -i eth0 -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A FORWARD -i eth1 -o eth0 -s 192.168.1.0/24 -j ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -s 192.168.1.0/24 -j MASQUERADE
iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 3389 -j DNAT
--to-destination 192.168.0.2:3389
echo 1 > /proc/sys/net/ipv4/ip_forward



Relevant Pages

  • NetFilter : connexion refused with my set of rules
    ... My set of rules to allow SSH connection from internet on port 443 to my ... $MODPROBE ip_conntrack ... # Adds some $IPTABLES targets like LOG, ...
    (comp.os.linux.security)
  • IPTables configuration
    ... This is the iptables script I use on the router: ... echo "You're using the example configuration for a setup of a firewall" ... # modprobe iptable_filter ...
    (comp.os.linux.setup)
  • HTTP SERVER ON FORWARDED MACHINE
    ... receives internet forwarded from the linux. ... Anyone can help with iptables or anything? ... $MODPROBE ip_conntrack ... # FORWARD chain rules ...
    (comp.os.linux.misc)
  • HTTP SERVER ON FORWARDED MACHINE
    ... receives internet forwarded from the linux. ... Anyone can help with iptables or anything? ... $MODPROBE ip_conntrack ... # FORWARD chain rules ...
    (comp.os.linux)
  • HTTP SERVER ON FORWARDED MACHINE
    ... receives internet forwarded from the linux. ... Anyone can help with iptables or anything? ... $MODPROBE ip_conntrack ... # FORWARD chain rules ...
    (comp.os.linux.security)