OPNsense Forum

Archive => 19.7 Legacy Series => Topic started by: bsdkilla on December 15, 2019, 12:31:34 AM

Title: How to redirect all traffic for a specific port?
Post by: bsdkilla on December 15, 2019, 12:31:34 AM
Running OpnSense 19.7.4

How can I configure OpnSense so all LAN traffic going to a specific destination port is redirected to a target IP on the LAN?

So if we have LAN IP 192.168.1.10 accessing an external IP address on port 3000, we want it redirected to target LAN IP 192.168.1.20:3000

I have tried configuring Outbound NAT but can't get this working and it seems this is broken in 19.7.x.  Can someone run me through the configuration steps in case I am doing something stupid?

Title: Re: How to redirect all traffic for a specific port?
Post by: bartjsmit on December 15, 2019, 10:18:50 AM
You're a bit unclear about your traffic directions, but I reckon you need to use 1:1 NAT. This ties an internal host to a public IP address in your WAN range.

Bart...
Title: Re: How to redirect all traffic for a specific port?
Post by: bsdkilla on December 15, 2019, 11:38:25 PM
Thanks for your thoughts, however 1-to-1 NAT would not achieve this as it maps source and destination IP addresses only.  We are wanting redirection to work on any Destination IP for a specific port 3000 only.

Title: Re: How to redirect all traffic for a specific port?
Post by: bsdkilla on December 16, 2019, 12:58:43 AM
I figured it out now, it was something stupid - on the Port Forward rule I had the wrong Interface selected.