{"id":282,"date":"2007-03-17T05:50:00","date_gmt":"2007-03-17T12:50:00","guid":{"rendered":"http:\/\/www.elbeno.com\/blog\/?p=282"},"modified":"2008-01-08T22:46:27","modified_gmt":"2008-01-09T06:46:27","slug":"port-triggering-with-openwrt-works","status":"publish","type":"post","link":"https:\/\/www.elbeno.com\/blog\/?p=282","title":{"rendered":"port triggering with OpenWRT works!"},"content":{"rendered":"<p>I finally got around to compiling the ipt_TRIGGER kernel module with some logging in there, so I could tell where I was going wrong with my iptables commands.<\/p>\n<p>The correct iptables commands are:<\/p>\n<p>#iptables -t nat -A prerouting_wan -p tcp &#8211;dport 6881:6889 -j TRIGGER &#8211;trigger-type dnat<br \/>\n#iptables -A forwarding_wan -p tcp &#8211;dport 6881:6889 -j TRIGGER &#8211;trigger-type in<br \/>\n#iptables -t nat -A prerouting_rule -i br0 -p tcp &#8211;dport 6969 -j TRIGGER &#8211;trigger-type out &#8211;trigger-proto all &#8211;trigger-match 6881-6889 &#8211;trigger-relate 6881-6889<\/p>\n<p>The first one handles NAT mangling for packets coming in off the WAN. The second one handles forwarding for the same packets. The last one is the one that creates a trigger when it spots an outbound BT packet.<\/p>\n<p>Edit: <a href=\"https:\/\/www.elbeno.com\/blog\/?p=288\">update here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I finally got around to compiling the ipt_TRIGGER kernel module with some logging in there, so I could tell where I was going wrong with my iptables commands. The correct iptables commands are: #iptables -t nat -A prerouting_wan -p tcp &#8211;dport 6881:6889 -j TRIGGER &#8211;trigger-type dnat #iptables -A forwarding_wan -p&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-282","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=282"}],"version-history":[{"count":0,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/282\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.elbeno.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}