Inbound port forwarding problem

Scripts with setup, destroy, and modify routing tables and firewall rulesets for client connections.
Post Reply
frillicca
OpenVpn Newbie
Posts: 2
Joined: Sun Dec 08, 2019 4:59 pm

Inbound port forwarding problem

Post by frillicca » Sun Dec 08, 2019 6:07 pm

Hi All

I try to share with you the issue that is making me crazy. :roll:

My Problem: to reach main page of OpenWRT router when running OpenVPN

My network topology:
Internet <----> Main router (no VPN) <----> OpenWRT router ( where there is a VPN )
11.11.11.11 <----> 192.168.1.1 <----> 192.168.1.11

TCP Port forwarding main router:

Code: Select all

192.168.1.11 port X to port X
TCP Port forwarding OpenWRT router:

Code: Select all

11.0.0.1 port X to port 443
ifconfig output for OpenWRT router:

Code: Select all

 br-lan    Link encap:Ethernet  HWaddr 
          inet addr:11.0.0.1  Bcast:11.0.0.255  Mask:255.255.255.0
          inet6 addr: fd18:ff47:bf2f::1/60 Scope:Global
          inet6 addr: fe80::22e5:2aff:fe68:e4a7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:612366 errors:0 dropped:0 overruns:0 frame:0
          TX packets:454663 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:593227759 (565.7 MiB)  TX bytes:492354113 (469.5 MiB)

eth0      Link encap:Ethernet  HWaddr 
          inet6 addr: fe80::22e5:2aff:fe68:e4a7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:213378 errors:0 dropped:0 overruns:0 frame:0
          TX packets:103855 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:206589882 (197.0 MiB)  TX bytes:32269725 (30.7 MiB)
          Interrupt:43 

eth0.1    Link encap:Ethernet  HWaddr 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5844 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:1513270 (1.4 MiB)

eth0.2    Link encap:Ethernet  HWaddr 
          inet addr:192.168.1.11  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::22e5:2aff:fe68:e4a7/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:213378 errors:0 dropped:0 overruns:0 frame:0
          TX packets:97976 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:202749078 (193.3 MiB)  TX bytes:30334129 (28.9 MiB)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:172.94.102.175  P-t-P:172.94.102.175  Mask:255.255.255.192
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:36324 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25004 errors:0 dropped:53 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:34304863 (32.7 MiB)  TX bytes:3153735 (3.0 MiB)

I read: viewtopic.php?f=17&t=18394&p=61620&hili ... lem#p61620 and I tried to transpose my IP addresses in this way but with no success:

ip rule list

Code: Select all

0:	from all lookup local 
32765:	from 192.168.1.11 lookup prelocal 
32766:	from all lookup main 
32767:	from all lookup default 
ip route list table 128

Code: Select all

default via 192.168.1.1 dev eth0.2 
192.168.1.0/24 dev eth0.2  scope link 
then if i try https 11.11.11.11:X when the VPN is down I reach the web page w/ no trouble, if VPN is up I have no access :?

any advice please?

thank you

frillicca
OpenVpn Newbie
Posts: 2
Joined: Sun Dec 08, 2019 4:59 pm

Re: Inbound port forwarding problem

Post by frillicca » Sun Dec 08, 2019 6:40 pm

oh guys...5 min after my post I find the way and I SOLVED

I found the mistake in TCP Port forwarding OpenWRT router:
CODE: SELECT ALL
192.168.1.11 port X to port 443

anyway thank you for the previous discussion I mentioned in my post, it has been really useful

Post Reply