Thursday, January 3, 2019

Add a Virtual Router on your Lab Network (Part 3 NAT Configuration)

On the previous post we have managed to connect our machine (VyOS Router) with the internal network and the internet. 



Now we will configure our Router to be also our Lab NAT Device for all our VMs. 
As you we have already discussed the 192.168.0.0/24 network can be considered as our public network, or the gateway to the internet. 10.10.10.0/24 is the internal network. We will use the simplest method of NAT, Port Address Translation (PAT). The IP Address of each VM will change from 10.10.10.0/24 to 192.168.0.51 (One-to-Many)


Go to the VyOS privileged mode and apply the settings below:

First of all we will specify, which network will be NAT-ed (source). The rule number is a random number I selected and has no significance. 
set nat source rule 1 source address 10.10.10.0/24

Then we will specify which interface will apply that rule. 
set nat source rule 1 outbound-interface eth0

We will NAT any IP traffic.
set nat source rule 1 protocol all

Finally we will use the masquerade option, which will apply PAT (also known NAT overload)

set nat source rule 1 translation address masquerade



Now we can use any of the VMs created on our lab network (for example our AD/DNS Server) and access the internet through the VyOS Router.  






No comments:

Post a Comment

Cisco Call Manager - Create Unattended File

CUC and CUCM installation wizard has a lot of steps that require user's input. Luckily we can specify an unattende...