NAT configuration for traffic with OpenVPN Server

Hi, I managed to configure OpenVPN successfully on Mikrotik router with 2 devices connected to it (VPN IP pool is 10.0.0.2-10.0.0.40):

  • Raspberry Pi (webserver) with static IP 10.0.0.33


  • Android device with static IP 10.0.0.34

Both devices ping each other.

Mikrotik router IP addresses:

  • local address for home network: 192.168.0.52


  • address for Local Network: 192.168.88.1 - default, info taken from Quick Set

Mikrotik is connected to ISP router via WAN port (ether1) so I did some port forwarding on ISP router (for local address 192.168.0.52, forwarding both ports 1194 for OpenVPN, and 8080 for standard traffic).

Now, let’s say that I send a request from my Android device to my public IP (provided by ISP): 89.55.xx.xxx
What I want is to route/filter this traffic so it can peacefully come to Raspberry PI’s webserver.

During my research, apart from adding filter rule for 8080 port (like I did for OpenVPN’s 1194), I tried a lot with many NAT’s (Hairpin?) combinations (masquerade and dst-nat) but with no success.

Do you have any idea how should I configure these traffic rules so I can finally connect to my webserver via OpenVPN without “Connection refused” errors?

Greets.

Hey. Just route traffic via tunnel without NAT. First of all you want ping that server from open vpn client side, then you could try to connect to it. Your Android device have to have default route to VPN gateway or you should write by yourself a specific route to the server via VPN gateway as nexthop. That’s all. Connection tracker will do the rest to route traffic back to VPN client.