How to Block Telnet/SSH request in Juniper

In this article we share how to block unauthorized Telnet/SSH access on Juniper
root#set firewall family inet filter local_acl term accept-telnet from source-address 172.16.16.0/24
root#set firewall family inet filter local_acl term accept-telnet from protocol tcp
root#set firewall family inet filter local_acl term accept-telnet from port ssh
root#set firewall family inet filter local_acl term accept-telnet from port telnet
root#set firewall family inet filter local_acl term accept-telnet then accept
root#set firewall family inet filter local_acl term denied-access from protocol tcp
root#set firewall family inet filter local_acl term denied-access from port ssh
root#set firewall family inet filter local_acl term denied-access from port telnet
root#set firewall family inet filter local_acl term denied-access then log
root#set firewall family inet filter local_acl term denied-access then reject
root#set firewall family inet filter local_acl term default-term then accept
root#set interfaces lo0 unit 0 family inet filter input local_acl
root#set interfaces lo0 unit 0 family inet address 127.0.0.1/32
root#Commit

Related posts

Leave a Comment