Jump to content
Not connected, Your IP: 18.118.10.75

Recommended Posts

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 ACCEPT
iptables -I FORWARD -i tun0 -p tcp -d 192.168.1.50 --dport 10001 -j ACCEPT
iptables -t nat -I PREROUTING -i tun0 -p tcp --dport 10001 -j DNAT --to-destination 192.168.1.50
iptables -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 VPN

The IP adress of the security system is set to 192.168.1.50

The 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 ACCEPT
iptables -I FORWARD -i tun0 -o br0 -j ACCEPT
iptables -I INPUT -i tun0 -j REJECT
iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
iptables -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

Share this post


Link to post

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?

Share this post


Link to post

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.

Share this post


Link to post

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

Share this post


Link to post

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.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Security Check
    Play CAPTCHA Audio
    Refresh Image

×
×
  • Create New...