Destination NAT
Learning Outcome
Destination Network Address Translation (DNAT) is used to redirect incoming traffic with an external address destination to an internal IP address inside the network. The external address can be the firewall interface or a virtual IP address. DNAT also offers the option to perform port forwarding or port translation.
DNAT enhances network security by hiding internal network infrastructure from translating public IP addresses, thus preventing direct access from external network.
Network Diagram

Table of IP addresses
Device Name
Interface
IP address
Client PC
ethernet
DHCP (192.168.1.224 in this case)
Checkpoint firewall
WAN
DHCP
Port 1
192.168.1.1 /24
Port 2
10.0.0.1 /24
NAT
192.168.1.100
SSH Server
ens33
10.0.0.101 /24
Web Server
ens33
10.0.0.102 /24
Introduction
The Client PC acts as an external party to access the internal resources from an external IP address and port. They are then translated to the internal server IP address and relative ports (http port 80 to 9000, ssh port 22 to 9500)
Procedures
Physically connect the devices as shown in the network diagram.
Set up VMWare
On the classroom PC, use 7-Zip to extract the Ubuntu VM image from Desktop> Files > Ubuntu.
Repeat the previous step to extract another Ubuntu VM.

In VMWare Workstation, go to File > Open, and select the location of the Ubuntu VM you have just extracted.
Now, there should be 2 Ubuntu VMs showing like the following screen. Rename them if required.

Right-click on both of the Ubuntu VMs and change the Network Adapter connection to VMnet0.
In VMware Workstation, click on Edit > Virtual Network Editor.
Click Change Settings
Make sure VMnet0 is showing Auto-bridging

Start the 2 Ubuntu virtual machines.
SSH server
Set IP address as 10.0.0.101 with subnet mask /24.
Install SSH by entering the command
sudo apt install ssh

Web server
Set IP address as 10.0.0.102 with subnet mask /24.
Install Apache web server by entering the command
sudo apt install apache2

Checkpoint firewall configuration
Go to the firewall GUI https://192.168.1.1:4434
Go to Device > Local Network.
LAN1 should be already configured as 192.168.1.1.
Setup LAN2 as a separate network with IP address 10.0.0.1 and a subnet mask /24.

Go to Users & Objects > Network Objects.
Create Web-Server, SSH-Server, and the NAT IP address as shown in the following screenshot

Go to Access Policy > NAT.
Add 2 manual NAT rules.
Create TCP port 9000 and 9500 as the DNAT ports while creating the rules.


Go to Access Policy > Policy
Create 2 incoming rules to allow access to the internal servers.

Verification
On the Client PC:
Open a web browser and go to http://192.168.1.100:9000
Open the command prompt and type in ssh 192.168.1.100 -p 9500 -l ubuntu


Teams:
Chawla, Harchit Singh
Dela Cruz, Juan Alden
Park, Jinwoo
Rezazadehnojehdehi, Nasim
Tsang, Ho Wan Howard

Last updated