OPNsense Forum

Archive => 17.7 Legacy Series => Topic started by: computernala on January 14, 2018, 08:51:04 am

Title: [SOLVED] How to configure 1: 1 NAT?
Post by: computernala on January 14, 2018, 08:51:04 am
My machine uses two NICs with WAN and LAN.
The WAN has 10.0.0.0/24 set to 10.0.0.15/24, and the LAN has 10.10.0.0/24 set to 10.10.0.1/24.

                                      ----------------------------------------------------------------
External(10.0.0.0/24) --- | (10.0.0.15/24)WAN   (OPNsense)    (10.10.0.1/24)LAN | --- (10.10.0.0/24)Internal
                                      ----------------------------------------------------------------

The internal network has a web server(10.10.0.60) and I want to connect the web server to the external IP (10.0.0.60/24).

1. Virtual IPs
Virtual IP address       Interface        Type               Description
10.0.0.60/24              WAN              IP Alias           web

2. NAT: One-to-One
Interface           External IP            Internal IP          Destination IP        Description
WAN                  10.0.0.60             10.10.0.60          *                          web

3. Rules
Floating
Proto         Source         Port        Destination         Port         Gateway         Schedule        Description
IPv4 *        *                 *            *                        *             *

LAN
Proto         Source         Port        Destination         Port         Gateway         Schedule        Description
*                *                 *           LAN Address       443           *                                       Anti-Lockout Rule
                                                                            80
IPv4 *         *                 *           *                       *               *                                       Default allow LAN to nay Rule
IPv6 *         *                 *           *                       *               *                                       Default allow LAN IPv6 to nay Rule

WAN
x

Finally, I uncheck Block private networks and Block bogon networks on the interface's WAN.
Now I can not access 10.0.0.60 from the external network.

Could someone help me with my One-to-One NAT configuration problem?
Title: Re: How to configure 1: 1 NAT?
Post by: computernala on January 14, 2018, 01:15:10 pm
https://forum.opnsense.org/index.php?topic=3050.msg9401#msg9401

Nice!! Thank you franco!!
Title: Re: [SOLVED] How to configure 1: 1 NAT?
Post by: franco on January 14, 2018, 01:30:56 pm
Hehe, you are most welcome. 8)