Jump to content
Not connected, Your IP: 3.230.143.40
lambrusco

Port forwarding through VPN on router

Recommended Posts

I've just got AirVPN running on my Tomato router and I'm trying to forward a port to a PC on the LAN side of it.

So I've got the port forwarded in AirVPN.

I've also forwarded the port inside the router to the specific PC.

I've also got a copy of uTorrent running on the PC expecting the forwarded port.

 

However, the port doesn't seem to be forwarded:

1. When I test the forwarded port on the AirVPN web page, I get "Not reachable - 111 connection refused"

2. uTorrent is showing a nasty red exclamation mark and is telling me that it is "Not connectable"

 

I have a similar setup elsewhere except that I'm running the VPN through the AirVPN Windows client instead of through the router and this works fine.

 

Am I missing something here? Are there any gotcha's for port forwarding through a VPN on a router?

 

Any help or advice would be much appreciated as I'm struggling to come to terms with all this.

TIA

Share this post


Link to post

I too am having the same issue as you. I might not be running Tomato but Openvpn is configured on the router correctly.

Share this post


Link to post

Hi Mr Staff,

 

Thanks for your response. Perhaps I should have mentioned that I'm a n00b and the link that you gave me looks like an arcane incantation that I had no idea how to use!

However, I can't expect to be spoon-fed everything, so a couple of hours with Mr Google increased my knowledge 10-fold.

 

First, when I said "I've also forwarded the port inside the router to the specific PC", perhaps I should have said that I used the router's web GUI to set up port forwarding. My research now leads me to believe that this merely forwards ports from the WAN to the LAN and doesn't affect ports forwarded through the VPN (which makes sense when you think about it). As a consequence, I have removed this entry (again using the GUI).

 

Next, what to do with your iptables command? More googling led me to go to the Administration -> Scripts -> Firewall section of my router's GUI and enter the iptable commands with relevant substitutions for destIP and port. But which tun parameter should I use?

 

More googling informed me that I could discover this through running ifconfig. But where? And how? Ahh, I have to telnet into my router - but wait a minute, it won't accept my login credentials. That's because, although I use admin as my login ID when using the GUI, telnet requires that I login as root. Silly me!

 

So, now I run ifconfig and it shows me that I have two tun interfaces, tun12 and tun21, of which tun12 is active and mapped to the IP address shown in my AirVPN Forwarded Ports page. Now we're getting somewhere!

 

So, adjust the iptables script, save everything, reboot the router, go and make a cup of tea, come back, recheck and what do you know? It works! Fantastic!

 

Thank you so much for your help. My head is full of all sorts of questions that I am determined to find the answers to ... just as soon as I've had a little lie down 

Can anybody point me to "A Beginner's Guide to Interacting with your Tomato Router"?

 

Cheers!

Share this post


Link to post

when running VPN on the router you do NOT use the port forwarding built into router firmware GUI.

 

you must do a DNAT as the IP tables linked to by Staff do.

 

SSH into the router and paste those lines into the command line, editing them to suit your setup.

 

to get a forwarded port, just go into your client area of this web page, forwarded ports section, and click the add button.  You will be assigned a port.  That port is what goes into the IP tables.

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