posts | comments
26Sep

emule/BT pass iptables

1 comment so far

dbr:~# cat pass_port
#!/bin/sh DSL_IF=”ppp0″
TCP_P=”4169″
UDP_P=”4179″
BT_P=”14074″
MY_HOST=”192.168.0.5″

iptables -t filter -A FORWARD -p tcp -i $DSL_IF –dport $TCP_P \
-j ACCEPT
iptables -t nat -A PREROUTING -p tcp -i $DSL_IF –dport $TCP_P \
-j DNAT –to-destination $MY_HOST:$TCP_P

iptables -t filter -A FORWARD -p udp -i $DSL_IF –dport $UDP_P \
-j ACCEPT
iptables -t nat -A PREROUTING -p udp -i $DSL_IF –dport $UDP_P \
-j DNAT –to-destination $MY_HOST:$UDP_P

iptables -t filter -A FORWARD -p tcp -i $DSL_IF –dport $BT_P \
-j ACCEPT
iptables -t nat -A PREROUTING -p tcp -i $DSL_IF –dport $BT_P \
-j DNAT –to-destination $MY_HOST:$BT_P

Categories: Network, Note, Unix/Linux

Wednesday, September 26th, 2007 at 3:33 pm and is filed under Network, Note, Unix/Linux. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

One Response to “emule/BT pass iptables”

  1. Posted by Wahoo 7th October, 2007 at 1:35 pm

    Thank you for sharing!

Leave a reply