Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
22.7 Legacy Series
»
[SOLVED] NAT Outbound doesn't translate IP & PORT
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] NAT Outbound doesn't translate IP & PORT (Read 982 times)
nono
Newbie
Posts: 23
Karma: 0
[SOLVED] NAT Outbound doesn't translate IP & PORT
«
on:
December 19, 2022, 02:51:08 pm »
Hi there,
I'm trying to setup WireGuard on OPNSense, which is behind a routeur acting as gateway.
The WAN Interface has a IP : 100.127.0.10/30 and GW: 100.127.0.9
Public IP is set (as Virtual IP to the WAN interface) and is 45.2.2.2
Meaning that when I connect to public_IP:51820 to reach my wireguard, I'll would need normally to create a NAT Outbound as follow :
Interface : WAN
Source Port : 51820
Translated Address : Public_IP
NAT Port: 51820
Static port : YES
However, it seems that I can't translate both the IP & the PORT, as seen on the following results :
this works:
100.127.0.10:51820 -> 1.2.3.4:51820 // Dummy IP, good port
this works
100.127.0.10:51820 -> 45.2.2.2:1234 // Good IP, Dummy port
this does not work:
100.127.0.10:51820 -> 45.2.2.2:51820 // Good IP, Good port
So I can translate either the IP (with the good port) or either the good port (with the wrong/dummy IP).
Am I missing something ?
«
Last Edit: December 20, 2022, 04:17:37 pm by nono
»
Logged
nono
Newbie
Posts: 23
Karma: 0
Re: NAT Outbound doesn't translate IP & PORT
«
Reply #1 on:
December 20, 2022, 04:17:23 pm »
I found the solution in here :
https://forum.opnsense.org/index.php?topic=19327.0
I had to ONLY have a Port Forwarding rules like follow :
Interface : WAN
Protocol: UDP
Destination: 45.2.2.2 (public ip)
Destination port: 51820
Redirect target IP: 100.127.0.10 (WAN IP)
Redirect target port: 51820
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
22.7 Legacy Series
»
[SOLVED] NAT Outbound doesn't translate IP & PORT