how to migrate the iptables from RedHat to FedoraCore4
From: nick (i141802596_at_yahoo.com)
Date: 11/21/05
- Next message: Bruce Coryell: "changing host name"
- Previous message: raffi: "is there a trojan for linux that can affect windows xp system?"
- Next in thread: noi: "Re: how to migrate the iptables from RedHat to FedoraCore4"
- Reply: noi: "Re: how to migrate the iptables from RedHat to FedoraCore4"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Bruce Coryell: "changing host name"
- Previous message: raffi: "is there a trojan for linux that can affect windows xp system?"
- Next in thread: noi: "Re: how to migrate the iptables from RedHat to FedoraCore4"
- Reply: noi: "Re: how to migrate the iptables from RedHat to FedoraCore4"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|