Need Help
Dear Russell, I have this setup in ipchains and now I want to convert in iptables. plz help me.
/sbin/ipchains -F forward /sbin/ipchains -F input /sbin/ipchains -F output /sbin/ipchains -P forward ACCEPT
/sbin/ipchains -P input ACCEPT
/sbin/ipchains -P output ACCEPT
echo "1" > /proc/sys/net/ipv4/ip_forward # for transparent proxy/sbin/ipchains -A input -j REDIRECT 8080 -p tcp -s 0.0.0.0/0 -d 0.0.0.0/0 80 # for direct connection excluding HTTP
/sbin/ipchains -A forward -j -p all -s 0.0.0.0/0 -d 0.0.0.0/0 It was my old setup in RedHat Linux 7.0Rel. Now I have installed new verions of RedHat Linux 7.2, with Kernel 2.4.7-10 and iptables version 1.2.3. thanks in advance shakir
Join the world’s largest e-mail service with MSN Hotmail. Click Here
hello,
this is the iptables version
/sbin/iptables -F/sbin/iptables -t nat -F
/sbin/iptables -P INPUT ACCEPT/sbin/iptables -P FORWARD ACCEPT/sbin/iptables -P OUTPUT ACCEPT
echo "1" > /proc/sys/net/ipv4/ip_forward
# for trasparent proxy /sbin/iptables -t nat -A PREROUTING -p tcp -s 0.0.0.0/0 --dport 80 -j REDIRECT --to-ports 8080 # for direct connection excluding HTTP /sbin/iptables -A FORWARD -p tcp -s 0.0.0.0/0 --dport 80 -j DROP
Davide
----- Original Message -----
From: Mohammad Shakir
To: [email protected]
Sent: Friday, September 27, 2002 1:08 PM
Subject: Need Help
Dear Russell,
I have this setup in ipchains and now I want to convert in iptables. plz help me.
/sbin/ipchains -F forward /sbin/ipchains -F input /sbin/ipchains -F output
/sbin/ipchains -P forward ACCEPT /sbin/ipchains -P input ACCEPT /sbin/ipchains -P output ACCEPT
echo "1" > /proc/sys/net/ipv4/ip_forward
# for transparent proxy /sbin/ipchains -A input -j REDIRECT 8080 -p tcp -s 0.0.0.0/0 -d 0.0.0.0/0 80 # for direct connection excluding HTTP /sbin/ipchains -A forward -j -p all -s 0.0.0.0/0 -d 0.0.0.0/0
It was my old setup in RedHat Linux 7.0Rel.
Now I have installed new verions of RedHat Linux 7.2, with Kernel 2.4.7-10 and iptables version 1.2.3.
thanks in advance
shakir
------------------------------------------------------------------------------
Join the world's largest e-mail service with MSN Hotmail. Click Here
Quoted 7 lines · Davide
hello,
this is the iptables version
/sbin/iptables-F/sbin/iptables-t nat -F
/sbin/iptables-P INPUT ACCEPT
Ugh.
Quoted 1 line
/sbin/iptables-P FORWARD ACCEPT
Ughhh !!!
Quoted 3 lines
/sbin/iptables-P OUTPUT ACCEPTecho "1" >
/proc/sys/net/ipv4/ip_forward
It's a good idea to put this *after* your rules, to avoid any period of time when the kernel's forwarding packets, but without a ruleset loaded...
Quoted 3 lines
# for trasparent proxy /sbin/iptables -t nat -A PREROUTING -p tcp -s 0.0.0.0/0 --dport 80 -j REDIRECT --to-ports 8080
The -s 0.0.0.0/0 is redundant.
Quoted 2 lines
# for direct connection excluding HTTP /sbin/iptables -A FORWARD -p tcp -s 0.0.0.0/0 --dport 80 -j DROP
Please do this as an explicit ACCEPT rule for *outbound* packets which do not match HTTP, and have a default DROP policy on the FORWARD chain (so you block anything trying to come in).
ie:
iptables -P FORWARD DROP
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A FORWARD -p tcp --dport ! 80 -o $extIF -j ACCEPT
Antony.
Signature · 3 lines
G- GIT/E d- s+:--(-) a+ C++++$ UL++++$ P+(---)>++ L+++(++++)$ !E W(-) N(-) o? w-- O !M V+++(--) !PS !PE Y+ PGP+> t- tv@ b+++ DI++ D--- e++>+++ h++ r@? 5? !X- !R K--?