OPNsense Forum

English Forums => Virtual private networks => Topic started by: shamu on July 21, 2023, 12:36:03 PM

Title: Routing public IP through Wiregard tunnel
Post by: shamu on July 21, 2023, 12:36:03 PM
Hi folks,

inspired by this article (sadly in German)
   https://administrator.de/tutorial/feste-ips-zuhause-in-pfsense-via-wireguard-tunnel-1124828094.html (https://administrator.de/tutorial/feste-ips-zuhause-in-pfsense-via-wireguard-tunnel-1124828094.html)
I tried to set up the following scenario:

- small cloud machine with 2 public IPv4 addresses (1)
- OPNsense v23.1.11 @home with dynamic public IP address (2)
- Wireguard tunnel between 1 and 2 to forward 2nd public IP address of 1 to 2

For setting it up and getting it basically working I found this article
https://docs.opnsense.org/manual/how-tos/wireguard-selective-routing.html (https://docs.opnsense.org/manual/how-tos/wireguard-selective-routing.html)
extremly helpfull!

What does work so far? Well,

But, what doesn't work is forwarding packages using 2nd public IP address of 1 as destination address to my destination hosts in my DMZ (perimeter net).

So far I spend several hours on testing different NAT and if rules, but OPNsense always drops incoming packages with message

Default deny / state violation rule

No idea anymore how or where to go ahead! Do you have an suggestions? May be one of you has the scenario described above already running!

Any help would be greatly appreciated!

Greetinx,

shamu