Got it

Configure NAT

Created: Yesterday 11:17Latest reply: Apr 20, 2022 15:21:03 84 4 0 0 0
  Rewarded HiCoins: 0 (problem resolved)

Hi all ,

I want some 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. 

This is my configuration.

Where is the problem?


acl number 3001
 rule 5 deny ip source 204.xx.xx.xx 0
 rule 10 deny ip source 204.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

Best answer

Recommended answer

DDSN
Admin Created Yesterday 12:25

Hi hasanarcas,

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


I hope it helps!

View more
  • x
  • convention:

All Answers
Dear friend! Please rest assured that we'll be back with an answer shortly.
View more
  • x
  • convention:

Posted by liqiang185 at 2022-04-20 11:24 Dear friend! Please rest assured that we'll be back with an answer shortly.
thank you
View more
  • x
  • convention:

Hi hasanarcas,

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


I hope it helps!

View more
  • x
  • convention:

Posted by DDSN at 2022-04-20 12:25 Hi hasanarcas,The deny rule in the ACL will directly discard packets. If you do not want to perform ...
great and clear answer!
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.