Re: Port forwarding

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

 



I think lots of people know how to forward ports.
Default policy doesn't concern you - it is DEFAULT. Once you add rules
that match the desired packets these rules do something and it is not
the default chain action.
Here is example port forwarding:
iptables -t nat -A PREROUTING -p tcp -d 192.168.1.2 --dport 27015 -j
DNAT --to-destination 192.168.0.34
iptables -t nat -A PREROUTING -p udp -d 192.168.1.2 --dport 27015 -j
DNAT --to-destination 192.168.0.34
And if your default FORWARD policy is DROP, then you should change it
to ACCEPT for the matched by the upper rules packets:
iptables -I FORWARD -d 192.168.1.2 -j ACCEPT
--
To unsubscribe from this list: send the line "unsubscribe netfilter" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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