Solved

Cisco ip nat inside access list

Posted on 2013-01-18
9
859 Views
Last Modified: 2013-02-03
Hello,

I need to set a access list on a ip nat  voip rule.

i have this nat rules that works fine:

ip nat inside source static tcp 192.168.11.254 80 57.23.88.xxx 80 extendable
ip nat inside source static udp 192.168.11.250 5060 57.23.88.xxx 5060 extendable

Now i need to allow only a access list to pass over ip nat on port 5060 (voip), the port 80 its public só no access list required.

new rule to voip:

The access list:
access-list 100 permit udp 79.41.34.xxx 0.0.0.63 eq 5060 any

the pool:
ip nat pool VOIP 192.168.11.250 192.168.11.250 netmask 255.255.255.0 type rotary
ip nat inside source list 100 pool VOIP

But this config don't work, all traffic was rejected, so what am doing wrong ?
0
Comment
Question by:_OpenSys_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 20

Expert Comment

by:rauenpc
ID: 38795615
Are you just trying to limit which public ip can come in on port 5060? Or are you trying to make a public appear like a private ip on your inside network?

If its the first case, define the nat rule without any acl's. configure an acl on the outside interface limiting the traffic on that port.

If its the second case, I think you might be using that nat command in the wrong direction. The way you have it, it means that any ip in the 79.41.34.x with source port 5060 can go anywhere from the INSIDE to the outside and get it's source nat'd to 192.168.11.250.

The following show an outside nat
http://www.cisco.com/en/US/tech/tk648/tk361/technologies_configuration_example09186a0080093f8e.shtml
0
 
LVL 17

Expert Comment

by:MAG03
ID: 38799293
as many PCs sen with a random source port the access list will never match unless traffic is sent on port 5060 (kind of what rauenpc said).  Also since your nat pool only has one address you would need to add the overload statement at the end of the NAT entry to allow more than 1 private IP to use the NATed IP at the same time.  try changing the access list and NAT statement:

access-list 100 permit udp 79.41.34.xxx 0.0.0.63 any eq 5060

ip nat inside source list 100 pool VOIP overload
0
 
LVL 2

Author Comment

by:_OpenSys_
ID: 38800621
No success my friends...

This is the perspective:

This portforward rule works for outside to inside, but is completed open for all internet:
ip nat inside source static udp 192.168.11.250 5060 57.23.88.xxx 5060 extendable

Now i need to limit it, and only 79.41.34.xxx 0.0.0.63 can pass over this nat rule.
Please post some cisco IOS rules.
0
Schedule a Tour of the ATEN booth at InfoComm 2017

Tour the ATEN booth to see the the Latest Addition to the Modular Matrix Switch Series, New 4K HDMI Over IP Extender and more! Enter ATEN's Ultimate Giveaway Sweepstakes for a chance to win one of several great prizes, including an ATEN US7220 2-Port Thunderbolt 2 Sharing Switch!

 
LVL 20

Expert Comment

by:rauenpc
ID: 38801055
I would just add an ACL rule to the outside interface limiting traffic on port 5060 to the source subnet snmp-server 79.41.34.xxx 0.0.0.63.

ip access-list extended OUTSIDE-IN
permit udp 79.41.34.xxx 0.0.0.63 eq 5060 57.23.88.xxx eq 5060
deny udp any eq 5060 57.23.88.xxx eq 5060


The above would permit the 79.41.34.xxx 0.0.0.63 subnet, and deny any other from attempting to come in via port 5060. You more than likely already have an outside acl, to the two lines would need to be added to the existing acl. Once in place, it won't matter that the NAT statement is wide open as the ACL still limits the traffic. You could then also enable logging on the deny rule if you'd like to see who gets denied.
0
 
LVL 6

Expert Comment

by:airwrck
ID: 38809000
do you have the interface on the outside (the one with the ip address 79.41.34.xxx) configured with "ip nat outside" ?

I'm assuming it's a different router than the one you are using for the other NAT, or on a different interface.
0
 
LVL 17

Expert Comment

by:MAG03
ID: 38815811
Remove the type rotary from the ip nat pool command.
0
 
LVL 2

Author Comment

by:_OpenSys_
ID: 38833096
No success until now, so i tried this simple method like this:

ip nat inside source list 100 interface FastEthernet4.3 overload
access-list 100 permit 79.41.34.xxx 0.0.0.63

All nat inside traffic must pass to access-list 100 right ?

So why when i put: "ip nat inside source static udp 192.168.11.250 5060 57.23.88.xxx 5060 extendable" and anyone can enter, making a bypass the access-list 100 . why?

I also try this rule above, but this port continues open for anyone and not only for acl 100:
ip nat inside source static udp 192.168.11.250 5060 interface FastEthernet4.3 5060

Ideas ?
0
 
LVL 2

Accepted Solution

by:
_OpenSys_ earned 0 total points
ID: 38833272
After lots of research and reading i found the way.

In public network interface:
ip access-group "name of access-list" in


the rule ip nat inside source list 100 interface FastEthernet4.3 overload only classify the output (private addresses) do will never works.

Thank you guys but i found my solution :)
0
 
LVL 2

Author Closing Comment

by:_OpenSys_
ID: 38848323
The ip nat inside get's the public IP translated, so it fail. The solution is getting the IP on the head with ip access-group  on public interface.
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When speed and performance are vital to revenue, companies must have complete confidence in their cloud environment.
You deserve ‘straight talk’ from your cloud provider about your risk, your costs, security, uptime and the processes that are in place to protect your mission-critical applications.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

687 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question