Got it

NAT configuration

Created: Apr 26, 2021 07:59:45Latest reply: Aug 14, 2021 18:48:04 451 2 1 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi,

We want some public IP addresses that can normally access the Internet not to perform NAT, so we made the following configuration. But after the configuration, the IPs that do not perform NAT can't access the public network. Is there any problem with the configuration?

acl number 3001
 rule 5 deny ip source 203.xx.xx.xx 0
 rule 10 deny ip source 203.xx.xx.yy 0

 rule 15 permit ip

interface GigabitEthernet1/0/1
 undo shutdown

 ip address xx.xx.xx.xx xx.xx.xx.xx

 nat bind acl 3001 instance nat1

Featured Answers

Recommended answer

Popeye_Wang
Admin Created Apr 26, 2021 08:00:24

Hello,
The deny rule in the ACL will directly discard packets. If you do not want to perform NAT for some addresses, you can configure two ACLs, one ACL permits the addresses that do not need NAT, and the other ACL is used for NAT.

The script is as follows:

acl number 3001
 rule 5 permit ip source 203.xx.xx.xx 0
 rule 10 permit ip source 203.xx.xx.yy 0
#
acl 3002
rule 5 permit ip source xx.xx.xx.xx xx
#
traffic classify NoNAT
  If match acl 3001
#
traffic classify NAT
  If match acl 3002
#
traffic behavior NoNAT
permit
#
traffic behavior NAT
  nat bind instance 3333
#
traffic policy NAT
Classify NoNAT behavior NoNAT
Classify NAT behavior NAT
#

interface GigabitEthernet1/0/1
 undo shutdown

 traffic-policy NAT outbound

#

View more
  • x
  • convention:

All Answers

Hello,
The deny rule in the ACL will directly discard packets. If you do not want to perform NAT for some addresses, you can configure two ACLs, one ACL permits the addresses that do not need NAT, and the other ACL is used for NAT.

The script is as follows:

acl number 3001
 rule 5 permit ip source 203.xx.xx.xx 0
 rule 10 permit ip source 203.xx.xx.yy 0
#
acl 3002
rule 5 permit ip source xx.xx.xx.xx xx
#
traffic classify NoNAT
  If match acl 3001
#
traffic classify NAT
  If match acl 3002
#
traffic behavior NoNAT
permit
#
traffic behavior NAT
  nat bind instance 3333
#
traffic policy NAT
Classify NoNAT behavior NoNAT
Classify NAT behavior NAT
#

interface GigabitEthernet1/0/1
 undo shutdown

 traffic-policy NAT outbound

#

View more
  • x
  • convention:

andersoncf1
andersoncf1 MVE Author Created Aug 14, 2021 18:48:04

Good answer! Congrats NAT configuration-4086503-1
View more
  • x
  • convention:

Comment

You need to log in to comment to the post Login | Register
Comment

Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " User Agreement."

My Followers

Login and enjoy all the member benefits

Login

Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.
Reminder
Please bind your phone number to obtain invitation bonus.