0

Good afternoon, I use Cisco 7201 I create a network on the gi0/0 interface connecting to a dhcp provider and get a static ip address, also on the gi0/1 interface I create a network where my 5 servers are, then I forward ports from servers from the network to the gi0/0 interface and port 22 becomes accessible from the Internet, but here's the task of how to make access only by ip to the port, I don't want someone else to connect to my port, I have a static ip in another place and I want to enter port 22 only with this ip. prohibit other ip from logging in, tried many options, after the command in the interface, the Internet ip access-group 101 in disappears.

ip nat inside source static tcp 192.168.1.22 22 interface GigabitEthernet0/0 22 

access-list 101 permit tcp host xxx.xxx.xxx.xxx any eq 22


ip nat inside source list 101 int gi0/0

I do such a sequence, the restriction does not work, everyone can enter port 22

ip nat inside source list 1 interface GigabitEthernet0/0 overload
ip nat inside source list 101 pool 12.161.45.13
ip nat inside source static tcp 192.168.1.22 22 interface GigabitEthernet0/0 22
ip nat inside source static tcp 192.168.1.25 150 interface GigabitEthernet0/0 150
ip nat inside source static tcp 192.168.1.22 80 interface GigabitEthernet0/0 80
ip nat inside source static tcp 192.168.1.21 21 interface GigabitEthernet0/0 21
ip nat inside source static tcp 192.168.1.21 77 interface GigabitEthernet0/0 77
!
logging alarm informational
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 101 permit tcp host 48.125.14.23 any eq 22
6
  • Please edit the question to include your configuration. Extended access lists include both the source and destination addresses.
    – Ron Maupin
    Commented Apr 23, 2023 at 20:35
  • You are not applying the access list.
    – Ron Maupin
    Commented Apr 23, 2023 at 20:42
  • If I apply the ip access-group 101 in list, then my Internet connection disappears and there is no Internet on all servers
    – ImeanLhas
    Commented Apr 23, 2023 at 20:44
  • How are you applying the ACL? ip nat inside source list <acl>?
    – Ron Maupin
    Commented Apr 23, 2023 at 20:48
  • ip nat inside source list 101 int gi0/0
    – ImeanLhas
    Commented Apr 23, 2023 at 20:59

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.