Port Redirection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello to all,

I need to redirect some services to my ssh port.
my firewall has two interfaces and i want to redirect all traffic to port 22,
so i added this code to my firewall script

...initialisation code....

My_PORTS_TCP="22 ftp telnet squid socks kazaa back_or"

echo -n "TCP port "
for i in $My_PORTS_TCP;
do
        echo -n "$i "
        $IPT -t nat -A PREROUTING -p TCP -d $EXTNET --dport $i -j REDIRECT --to-ports  22

        fi
done

but when i do tcpdump to port 22 i see no traffic at all, although i am doing ftp to my firewall !?!
questions:
1-Is the rule wrong ?
2-Is the tcpdump leastning in a raw socket before redirection ?
3-How can i confirm that redirection is functioning ?

please comment,


nassri



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux