LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2012, 05:33 PM   #1
captainkrypto
LQ Newbie
 
Registered: Dec 2004
Location: Florida
Distribution: Fedora 18
Posts: 15

Rep: Reputation: 0
Port forwarding on vpn router client


I am new to advanced networking so please forgive me.

I have set up my router as a VPN client using dd-wrt. Everything works great and I can selectively tunnel specific computers on the network through VPN. I have a computer acting as a web server using the VPN tunnel, but I am unable to hit it thought the VPN connection or WAN connection as the port does not appear to be open.

I have tried manually forwarding the port with the following:

Code:
iptables -t nat -I PREROUTING -i tun1 -p tcp --dport 80 -j DNAT --to-destination 192.168.1.42:80
which results in the following iptable rules:

Code:
root@RT-N16-MAIN:~# iptables -t nat -L -n -v
Chain PREROUTING (policy ACCEPT 517 packets, 53289 bytes)
 pkts bytes target     prot opt in     out     source               destination         
    0     0 DNAT       tcp  --  tun1   *       0.0.0.0/0            0.0.0.0/0           tcp dpt:80 to:192.168.1.42:80 
    0     0 DNAT       icmp --  *      *       0.0.0.0/0            71.xxx.xxx.166      to:192.168.1.1 
  170 20304 TRIGGER    0    --  *      *       0.0.0.0/0            71.xxx.xxx.166      TRIGGER type:dnat match:0 relate:0 

Chain POSTROUTING (policy ACCEPT 27 packets, 1567 bytes)
 pkts bytes target     prot opt in     out     source               destination         
  158 10242 MASQUERADE  0    --  *      tun1    0.0.0.0/0            0.0.0.0/0           
  175 20257 SNAT       0    --  *      vlan2   192.168.1.0/24       0.0.0.0/0           to:71.xxx.xxx.166 
    0     0 RETURN     0    --  *      br0     0.0.0.0/0            0.0.0.0/0           PKTTYPE = broadcast 
    2   586 MASQUERADE  0    --  *      br0     192.168.1.0/24       192.168.1.0/24      

Chain OUTPUT (policy ACCEPT 155 packets, 10331 bytes)
 pkts bytes target     prot opt in     out     source               destination
I was hoping that someone can point me in the right direction to get this working. Sorry if I didn't provide enough info, but let me know if further info is needed. Any help/suggestions/direction is much appreciated!

Thanks!
 
Old 05-16-2012, 11:34 AM   #2
captainkrypto
LQ Newbie
 
Registered: Dec 2004
Location: Florida
Distribution: Fedora 18
Posts: 15

Original Poster
Rep: Reputation: 0
Can someone even give me a high level overview of the next step so I can research further? Or point me in the right direction? Or even a guide or something? I've been trying to figure out this for weeks, and my knowledge level on the subject is very low. Thanks!
 
Old 05-08-2013, 05:38 PM   #3
b0rked
LQ Newbie
 
Registered: May 2013
Posts: 1

Rep: Reputation: Disabled
Surely someone else has run into this?

As much I can't stand +1 replies, I too have been trying to sort this out. There must be others out there who have ran into this?
 
Old 05-09-2013, 08:48 AM   #4
captainkrypto
LQ Newbie
 
Registered: Dec 2004
Location: Florida
Distribution: Fedora 18
Posts: 15

Original Poster
Rep: Reputation: 0
I've searched for a solution for some time and, someone can correct me if I am wrong, but I don't think it is possible to forward ports through a VPN tunnel without some kind of setup on the VPN provider/server side. I've seen some VPN providers with the ability to do this, but haven't yet implemented anything myself.
 
  


Reply

Tags
dd-wrt, port forwarding, vpn


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
port forwarding without router jkeertir Linux - Newbie 3 09-17-2009 10:56 AM
Port Forwarding from Router to Client expatCM Linux - Networking 0 08-06-2008 05:38 AM
Port Forwarding For Router kool_kid Linux - Networking 4 09-25-2007 02:10 PM
port forwarding on Belkin 4-port Cable/DSL Gateway Router sycamorex Linux - Networking 5 03-05-2007 03:27 PM
router port forwarding/ssh epoo Slackware 7 12-30-2003 03:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration