Port forwarding
Using our previous example, let's consider a small company with three web servers but with just one public IP address and a lot of users needing to access them from the internet. How can we solve this problem using just firewall features? By creating an inbound NAT rule! We will refer to this type of NAT in this book in the same way as OPNsense: port forwarding. It will forward a port or a port range from the public interface to an internal host such as, for example, a web server. At the same time, the port number/range can be changed.
Using the preceding example, let's take a look at the following topology:
In the preceding figure, you can see a client requesting access from the internet to the public IP 200.200.200.1
on port 8080
. When this request arrives in our firewall, it will look for a NAT entry that forwards port 8080
in its public IP address to an internal address and port...