Bartosz Wegrzyn <(E-Mail Removed)> wrote:
> I am trying to redirect port 5100 to differnet Pc on my network.
> I created those rules but it is not working.
>
> Please check.
>
> /sbin/modprobe iptable_nat
>
> /sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
>
> echo 1 > /proc/sys/net/ipv4/ip_forward
>
> /sbin/iptables -N block
> /sbin/iptables -A block -m state --state ESTABLISHED,RELATED -j ACCEPT
> /sbin/iptables -A block -m state --state NEW -i ! ppp0 -j ACCEPT
> /sbin/iptables -A block -j DROP
/sbin/iptables -A FORWARD -i ppp0 -p tcp --destination-port 5100 -j ACCEPT
> /sbin/iptables -A INPUT -j block
> /sbin/iptables -A FORWARD -j block
>
>
> /sbin/iptables -t nat -A PREROUTING -i ppp0 -p tcp --destination-port
> 5100 -j DNAT --to-destination 192.168.0.103:5100
Ciao, Horst
--
»When pings go wrong (It hurts me too)« E.Clapton/E.James/P.Tscharn
|