Community discussions

MikroTik App
 
thomasleuchtkultur
just joined
Topic Author
Posts: 3
Joined: Fri Jul 23, 2021 1:38 pm

Port Forwarding from VPN to Client on Ethernet

Fri Jul 23, 2021 1:45 pm

Hello Community,
its the first time i use Mikrotik products, so please excuse my very basic question.

I have following Setup:

VPN ( OpenVPN) Server 10.8.0.x ---> LTE --> Mikrotik LtAP LR8 LTE ( Openvpn Client ) 10.8.0.2 |192.168.123.254 --> Client 192.168.123.100

I can connect to the configuration website of the LtAP - and now i would like to forward Port 8080 to the port 80 of 192.168.123.100 so that i can connect to the webserver of this device.

Can anybody tell me how the nat/rules/firewall settings have to look like ?
Thanks a lot !

Thomas
 
User avatar
anav
Forum Guru
Forum Guru
Posts: 18958
Joined: Sun Feb 18, 2018 11:28 pm
Location: Nova Scotia, Canada
Contact:

Re: Port Forwarding from VPN to Client on Ethernet

Sat Jul 24, 2021 5:49 pm

Hi Thomas.

So you have an MT device acting as a router and behind that router you have client PC.
Somewhere else on the internet you have an openvpn server which is where attached to what??

Why would you port forward to a client PC is the question seemingly being posed. One port forwards to a server.
In other words, need a clearer description perhaps with a network diagram.
 
thomasleuchtkultur
just joined
Topic Author
Posts: 3
Joined: Fri Jul 23, 2021 1:38 pm

Re: Port Forwarding from VPN to Client on Ethernet

Mon Jul 26, 2021 2:45 pm

Hey Anav,

sorry that i used "server/client" so interchangeable.

To make it more clear: I have a laptop and the MT in a VPN network. ( 10.8.0.x ). This works and i can acces the config-panel of the MT from my laptop.
On the wired ethernet-port of the MT i have an other "network" ( 192.168.123.x/24 ). In this network all devices can talk to each other and its fine.
Now i would like to setup a port-forewarding on the MT so that wenn i acces its vpn-ip ( 10.8.0.2 ) on port 8081 that it then sends the packages to a computer on the wired network.

Like this: Laptop ( 10.8.0.1 ) >>> VPN >>>> Mikrotik ( VPN IP: 10.8.0.2 Local IP: 192.168.123.254 ) >>>> Computer ( 192.168.123.1:80 )


Thanks for your help !
 
User avatar
CZFan
Forum Guru
Forum Guru
Posts: 2098
Joined: Sun Oct 09, 2016 8:25 pm
Location: South Africa, Krugersdorp (Home town of Brad Binder)
Contact:

Re: Port Forwarding from VPN to Client on Ethernet  [SOLVED]

Mon Jul 26, 2021 4:04 pm

It can differ a bit depending your exact config, but if the IP of the VPN client is static, it can look something like below:
/ip firewall nat add chain=dstnat dst-address=10.8.0.2 port=8081 action=dst-nat to-addresses=192.168.123.1 to-ports=80
Instead of dst-address, you can also use in-interface/list, etc
 
thomasleuchtkultur
just joined
Topic Author
Posts: 3
Joined: Fri Jul 23, 2021 1:38 pm

Re: Port Forwarding from VPN to Client on Ethernet

Mon Jul 26, 2021 4:22 pm

Dear CZFan,

thansk for your hint! This was the right point into the direction i needed. Got it working now also with the help of the wiki that i foud by googeling your hint :)

Thomas
It can differ a bit depending your exact config, but if the IP of the VPN client is static, it can look something like below:
/ip firewall nat add chain=dstnat dst-address=10.8.0.2 port=8081 action=dst-nat to-addresses=192.168.123.1 to-ports=80
Instead of dst-address, you can also use in-interface/list, etc

Who is online

Users browsing this forum: bashay8, BrateloSlava, dmconde, haedertowfeq and 62 guests