• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Need a little bit of help with iptables

DaiShan

Diamond Member
I'm trying to open a port range so that PASV connections will work with my proftpd, but I can't seem to figure out how to do this. Does anyone know how to open a range of ports so that I don't have to type out every port that needs to be opened? I've never really had a need to open more than 1 or two ports at a time before heh. TIA.
 
http://btfaq.com/serve/cache/25.html
Take a look at how they handled it for bittorrent. It might apply to your case.

In addition to the syntax illustrated here, iptables supports the specification of a range of ports using the syntax --dport $START:$END so the whole 6881-6999 range used in BT 3.2+ can be NAT'ed. For example...
=== start script === #!/bin/bash BTFORWARDADDR=192.168.2.20 PORTSTART=6881 PORTEND=6999
/sbin/iptables -t nat -A PREROUTING -i ppp0 -p tcp --dport $PORTSTART:$PORTEND -j DNAT --to-destination $BTFORWARDADDR
/sbin/iptables -A FORWARD -s $BTFORWARDADDR -p tcp --dport $PORTSTART:$PORTEND -j ACCEPT
=== end script ===
 
Back
Top