I am trying to limit access to our SIP servers to only 209.85.2.10
however,
I am getting a little confused by the permit ip any any log
. Will it not allow everything in? Without it, I loose all the rest of the needed traffic.
Question, how do I limit access to 5060
to only permit ip any any log
and retain the rest of the traffic (ie, http, smtp..).
The permit ip any any log
seems to contradict the constraint by allowing other servers to connect.
Internal Network
interface GigabitEthernet0/1
ip address 192.168.2.1 255.255.255.0
ip nat inside
ip access-group 104 out
exit
ip access-list extended 104
permit udp host 209.85.2.10 host 192.168.2.5 eq 5060 log
permit ip any any log
deny ip any any log
deny tcp any any log
deny udp any any log
exit
Update
So I need to change the above to
ip access-list extended 104
permit udp host 209.85.2.10 host 192.168.2.5 eq 5060 log
deny ip any host 192.168.2.5 log
permit ip any any log
exit
Then this will work as expected?
i) Accept 5060
access to 192.168.2.5
only from 209.85.2.10
, and deny the rest of the attempts on the 5060
port
ii) Let other traffic in from anywhere to anywhere within the network but 5060
?
Update Final Product
For those who will find this post in the future. Here is the config that works for me thanks to the help of the two gentlemen in this thread.
ip access-list extended 104
permit tcp any host 192.168.2.5 eq 53
permit udp any host 192.168.2.5 eq 53
permit tcp any host 192.168.2.10 eq 25
permit tcp any host 192.168.2.10 eq 587
permit tcp any host 192.168.2.10 eq 993
permit tcp any host 192.168.2.10 eq 995
permit tcp any host 192.168.2.15 eq 80
permit tcp any host 192.168.2.15 eq 443
permit udp host 205.205.22.186 host 192.168.2.5 eq 5060
permit udp host 205.205.74.186 host 192.168.2.5 eq 5060
permit udp host 70.83.45.11 host 192.168.2.5 eq 5060
permit udp any host 192.168.2.20 eq 5080
permit udp any host 192.168.2.5 range 8000 65535
permit tcp any eq 25 host 192.168.2.10 range 1024 65535 established
permit tcp any eq 53 host 192.168.2.5 range 1024 65535 established
permit tcp any eq 53 host 192.168.2.10 range 1024 65535 established
permit tcp any eq 53 host 192.168.2.15 range 1024 65535 established
permit tcp any eq 53 host 192.168.2.20 range 1024 65535 established
permit udp any eq 53 host 192.168.2.5 range 1024 65535
permit udp any eq 53 host 192.168.2.10 range 1024 65535
permit udp any eq 53 host 192.168.2.15 range 1024 65535
permit udp any eq 53 host 192.168.2.20 range 1024 65535
permit tcp any eq 80 host 192.168.2.5 range 1024 65535 established
permit tcp any eq 80 host 192.168.2.10 range 1024 65535 established
permit tcp any eq 80 host 192.168.2.15 range 1024 65535 established
permit tcp any eq 80 host 192.168.2.20 range 1024 65535 established
deny ip any host 192.168.2.5 log
deny ip any host 192.168.2.10 log
deny ip any host 192.168.2.15 log
deny ip any host 192.168.2.20 log
permit ip any any
exit
ip nat inside source static 192.168.2.5 77.77.77.77 route-map voip-rtp extendable
Thanks in Advance,
Nick.
log
on thepermit ip any any log
statement. This will kill your router's performance and probably drive it's CPU utilization to unacceptable levels. Typically, you only want to log specificdeny
statements, if at all.log
from accepts. One example is:: %SEC-6-IPACCESSLOGP: list 104 permitted udp 105.105.211.10(11180) -> 192.168.2.5(23854), 9746 packets
This accept is a big deal for me. It's a port range accept on the udp. A hot topic these days.... ;)