Thursday, 1 June 2017

MIKROTIK:-NAT configuration (Snat and PAT)

NAT is most important thing to provide the internet to users if you are using the private IP in your network . Here i am using the Private IP address in my network So i have to use the NAT to translate the private IP in to Public IP .

There are many ways to configure the NAT in the Mikrotik .

Here I have a /24 private Ip pool and i am configuring them into one public IP address which is my WAN and that one public IP is provided by my ISP .But in the Mikrotik that concept is called as Masquerade .



 Go to IP>Firewall >NAT then ADD(+)

















Enter The LAN IP pool in the source address list .



Then Go To Action and select the Masquerade .

The Masquerade means all your source ip pool will be translated into your single WAN public IP  address when they will go out of the network .


CMD:-

/ip firewall nat add chain=srcnat action=masquerade 

SNAT Configuration :- 

In this scenario I have a same /24 LAN private IP pool but i dont want to configure the NAT in to WAN ip address , I have some public IP range which is provided by my ISP so i am going to use that IP pool as Natting ip for this Lan IP Pool . and all the LAN users will be translated in to that public ip Pool.. There is a little modification required in the NAT configuration and Only I will have to enter the SNAT ip pool range  instead of masqueraded



Here , In the To Address list I have enter the ranges of Public IP which pool i am going to use
as SNAT ip Pool.


Address List . The address list is same as the NAME ACL in Cisco .You can configure the multiple IP ranges in the same name and you can call that name in the Advance of source address list in case of NAT . This is quite intelligence technology to add the IP's in Address list and that would be easier to configure the same rule for multiple IP pools.

Here , I am just giving you one example and later on I will show you more example when i will configure some advance firewall settings in Mikrotik .

Natting using Address List of the Firewall .

Here , you can see i have entered 2 networks in the address List so it would be easier for me to configure the NAT in single Line because I have the same name for both the Network.Here I am not entering Ip address in source address list of General tab instead i have called that name in advance tab of source ip list .




Completed the task Now .

No comments:

Post a Comment