LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 05-19-2017, 10:18 AM   #1
amatamavis
LQ Newbie
 
Registered: May 2017
Location: Edmonton
Posts: 4

Rep: Reputation: Disabled
Double Router OpenVpn Port Forwarding


Here Is my Scenario :
REFS:
ROUTER1------------ -IS A ROUTER/MODEM combo. and connects to internet through Isp phone line.
Does not support dd-wrt firmware, so the need for second router

ROUTER2..............just router only, connects to the wan port of Router1 to get to internet, Flashed with dd-wrt for vpn client support

ROUTER_1 _INTERNAL IP: 192.168.1.1, DHCP is enabled.

ROUTER_2 _INTERNAL IP: 192.168.2.1, GATEWAY:0.0.0.0, DNS:dns: 0.0.0.0.


ROUTER_2 _EXTERNAL IP: 192.168.1.20, GATEWAY:192.168.1.1, DNS:dns: from vpn provider.

PC1 _INTERNAL IP: 192.168.2.102, GATEWAY:192.168.2.1, DNS:dns: from vpn provider.
PC2 _INTERNAL IP: 192.168.2.103, GATEWAY:192.168.2.1, DNS:dns: from vpn provider.


DHCP IS DISABLED ON ROUTER2 SO EVERYTHING IS STATIC



VPN (openvpn client) is INSTALLED ON Router2 through commandline.

Now all PC1 & PC2 can now connect to wireless ssid of Router2 and vpn works on them all


PORT FORWARDING ON PC1 & PC2 FOR EXTERNAL SERVICE TO ACCESS THEM
Everything works well without vpn , but once i turn on vpn I loose access to the port.

PROBLEM HERE:
The vpn provider said the problem has nothing to do with their service.
I did as adviced on here http://www.dd-wrt.com/phpBB2/viewtop...e0a4a1659b9499
and it still failed.
here is what i executed on the dd-wrt console for PC1:
iptables -t nat -I PREROUTING -i ath0 -p tcp --dport 2300 -j DNAT --to-destination 192.168.2.102
iptables -I FORWARD -p tcp -d 192.168.2.102 --dport 2300 -j ACCEPT

and I can't still see the service.
Please any help to make it work would be appreciated.
 
Old 05-21-2017, 05:42 AM   #2
amatamavis
LQ Newbie
 
Registered: May 2017
Location: Edmonton
Posts: 4

Original Poster
Rep: Reputation: Disabled
Now wondering

Now am wondering if i could do same thing with a hosted vps service , such that i setup my own vpn server and have multiple client behind my router connected to it. Then each client can forward port as they like ? Just wondering though. I really would prefer vpn client on router installation with forwarded port for each client with a static local ip.
 
  


Reply



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
OpenVPN and port-forwarding shoelesshunter Linux - Networking 9 05-19-2015 11:41 AM
ip forwarding with iptables - double forwarding with openVPN?? sousacanfly Linux - Networking 8 01-20-2014 08:49 AM
OPENVPN - Port Forwarding giannos Linux - Networking 4 10-12-2010 07:53 AM
port forwarding - multiple IP's and openvpn jonnytabpni Linux - Networking 2 09-19-2009 01:41 AM

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

All times are GMT -5. The time now is 06:06 PM.

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