Home
Help
Search
Login
Register
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
NAT port forward rule working, but not connecting
« previous
next »
Print
Pages: [
1
]
Author
Topic: NAT port forward rule working, but not connecting (Read 1602 times)
biapy
Newbie
Posts: 3
Karma: 0
NAT port forward rule working, but not connecting
«
on:
May 03, 2023, 10:19:38 pm »
Hi,
i'm very new to OPNsense. I've installed OPNsense as a Proxmox VM, using virtIO network interfaces.
I'm trying to setup a very basic NAT port forward rule for SSH:
vtnet0 (wan): ip: 10.0.0.254
vtnet1 (lan): ip: 10.0.1.1
on lan connected to vtnet1: _target_: ip: 10.0.1.254 (fixed).
When logged in in OPNsense console, i can connect without issue to _target_, port 22 (namely SSH).
I created a NAT port forward rule allowing traffic connecting to 10.0.0.254:2222 to connect to 10.0.1.254:22 (see attached NAT configuration form).
This rule works partially (see attached live firewall logs screenshot), but the connection does not open. It stops after "let out anything from firewall host itself" rule.
Can someone help me trouble shouting this issue ? Thank you.
Logged
biapy
Newbie
Posts: 3
Karma: 0
Re: NAT port forward rule working, but not connecting
«
Reply #1 on:
May 04, 2023, 09:13:37 pm »
For future reference, the issue was due to the target LAN interface not routing traffic to the source IP of the NATed connection to OPNsense by OPNsense:
source -> OPNsense -> target (on LAN)
source <- target (on LAN)
Not an issue in OPNsense configuration.
Logged
rsharmam
Newbie
Posts: 2
Karma: 0
Re: NAT port forward rule working, but not connecting
«
Reply #2 on:
June 28, 2023, 07:15:51 am »
how to make it work?
Logged
biapy
Newbie
Posts: 3
Karma: 0
Re: NAT port forward rule working, but not connecting
«
Reply #3 on:
July 07, 2023, 06:01:28 am »
I did not resolve it. It can be resolve with a complex routing, but i did not bother.
I think the solution is to add a custom route for outgoing internet traffic to pass by the OPNsense firewall, but it should have an exception for outgoing traffic coming from the OPNsense VM. I do not have the time currently to solve this issue.
Logged
rsharmam
Newbie
Posts: 2
Karma: 0
Re: NAT port forward rule working, but not connecting
«
Reply #4 on:
July 07, 2023, 06:03:05 am »
i used WAN with a physical NIC and LAN with no physical NIC at all, also at the same time i installed pfsense instead of opnsense and it worked. however u can try with opnsense also
Logged
Print
Pages: [
1
]
« previous
next »
OPNsense Forum
»
Archive
»
23.1 Legacy Series
»
NAT port forward rule working, but not connecting