Jump to content
TorGuard
  • 0
Bean_001

[SOLVED] Port Forwarding on DD-WRT & Dedicated IP

Rate this question

Question

Bean_001

Here's the setup:

ISP Router > Main Router running DD-WRT v3.0 > LAN & a Webserver on port 81.

All devices/computers have a static local IP.

The VPN is working great on a Dedicated IP. All traffic is going through the VPN as intended.

I have zero interest in bypassing the VPN.

 

The problem is that I'm unable to connect to the webserver via the dedicated IP. I can access it fine on the LAN.

I've tried Port Forwarding using DD-WRT's GUI as well as iptables in Administration > Commands > Firewall 

iptables -I FORWARD -i tun1 -p udp -d 192.168.0.160 --dport 81 -j ACCEPT
iptables -I FORWARD -i tun1 -p tcp -d 192.168.0.160 --dport 81 -j ACCEPT
iptables -t nat -I PREROUTING -i tun1 -p udp --dport 81 -j DNAT --to-destination 192.168.0.160
iptables -t nat -I PREROUTING -i tun1 -p tcp --dport 81 -j DNAT --to-destination 192.168.0.160

DD-WRT > Status > Bandwidth shows tun1 so I believe that is correct. I'm not sure what else could be wrong with the above code. UDP probably isn't even needed but I figured it can't hurt to include it for now.

Any help would be appreciated.

Share this post


Link to post
Share on other sites

1 answer to this question

Recommended Posts

  • 0
Bean_001

This is resolved. I didn't realize you had to open ports on the server side as well. Which makes total sense from a security standpoint but I'm still new to VPN's.

I'll leave this here for the next newbie to come across.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   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...

×
×
  • Create New...