another way of doing this (previous post didnt seem to solve my problem) is:
Things marked with
bold should be changed to fit your set up:
eth0 - replace that with your external interface
xxx.xxx.xxx.xxx - replace that with your external ip (
get your external IP from here )
yyy.yyy.yyy.yyy - replace that with the IP of the computer running dc++
zzzz - in DC++, File->Settings->Connection Settings, choose Active, in the IP box enter your external IP, in the port box enter any number (recommended to be higher than 1024). Modify the script below with the port you chose in dc++ settings. EX: 6666, 8888, 1400, etc.
Below are the 4 commands you need to run to make dc++ run in active mode while behind NAT:
Code:
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j DNAT --to yyy.yyy.yyy.yyy:zzzz
/sbin/iptables -t nat -A PREROUTING -p udp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j DNAT --to yyy.yyy.yyy.yyy:zzzz
/sbin/iptables -A FORWARD -p tcp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j ACCEPT
/sbin/iptables -A FORWARD -p udp -i eth0 -d xxx.xxx.xxx.xxx --dport zzzz -j ACCEPT