blitzsven 0 Posted ... Hello! I have been trying to port forward ports for a security system sadly no luck. I use a DDWRT router (X10, Netgear)I know I have to write custom script into the firewall but it doesn't seem to work, obviously I am doing something wrong. iptables -I FORWARD -i tun0 -p udp -d 192.168.1.50 --dport 10001 -j ACCEPTiptables -I FORWARD -i tun0 -p tcp -d 192.168.1.50 --dport 10001 -j ACCEPTiptables -t nat -I PREROUTING -i tun0 -p tcp --dport 10001 -j DNAT --to-destination 192.168.1.50iptables -t nat -I PREROUTING -i tun0 -p udp --dport 10001 -j DNAT --to-destination 192.168.1.50 What am I doing wrong? My router is using tun0 for VPNThe IP adress of the security system is set to 192.168.1.50The port needed to be forwarded is 10001 I have also forwarded the port in the Client Area. I have checked the port on canyouseeme.org and airvpn itself. Both seem unable to reach. iptables -I FORWARD -i br0 -o tun0 -j ACCEPTiptables -I FORWARD -i tun0 -o br0 -j ACCEPTiptables -I INPUT -i tun0 -j REJECTiptables -t nat -A POSTROUTING -o tun0 -j MASQUERADEiptables -I INPUT -p udp --dport 68 -j ACCEPT This also is in my firewall setting but that shouldn't conflict with each other (I think) Kind regards,Blitz Quote Share this post Link to post
go558a83nk 364 Posted ... 1) did you verify the interface is TUN0? 2) Also can you be more detailed with your port forward rule on this site? Did you specify the internal (local) port as 10001 but external is something different? Quote Share this post Link to post
asr2999 3 Posted ... Just a tiny recommendation as I got caught by a mistake myself.You can't test this from a device within your l'an. That doesn't work. You need to try it from outside your l'an. Quote Share this post Link to post
blitzsven 0 Posted ... 1) did you verify the interface is TUN0? 2) Also can you be more detailed with your port forward rule on this site? Did you specify the internal (local) port as 10001 but external is something different? Hi! Thanks for the reply. I have not verified it since I got told it uses TUN0. After using the commands ifconfig in the console I noticed that is was TUN1. Learned my lesson there. Very good the suggestion, after a while I look over the simplest solutions. Im not sure point 2 matters here as it got resolved. ports on my end were 10001 on client area I wasnt able to pick 10001 as it was already in use. So it gave me a random one instead which is all fine. Thanks again!Blitz Quote Share this post Link to post
blitzsven 0 Posted ... Just a tiny recommendation as I got caught by a mistake myself.You can't test this from a device within your l'an. That doesn't work. You need to try it from outside your l'an. Thanks for the suggestion! I have fixed it but I will keep this recommendation in mind for sure! Blitz. Quote Share this post Link to post