Drop any outgoing telnet connections

This commit is contained in:
Bob Mottram 2017-04-25 12:28:26 +01:00
parent 4a0982acd0
commit 794962ac85
2 changed files with 16 additions and 0 deletions

View File

@ -153,6 +153,19 @@ function configure_firewall {
mark_completed $FUNCNAME
}
function firewall_drop_telnet {
if [[ $(is_completed $FUNCNAME) == "1" ]]; then
return
fi
# telnet isn't enabled as an input and we can also
# drop any outgoing telnet, just in case
iptables -A OUTPUT -p tcp --dport telnet -j REJECT
iptables -A OUTPUT -p udp --dport telnet -j REJECT
function_check save_firewall_settings
save_firewall_settings
mark_completed $FUNCNAME
}
function configure_firewall_ping {
if [[ $(is_completed $FUNCNAME) == "1" ]]; then
return

View File

@ -561,6 +561,9 @@ function setup_firewall {
function_check configure_firewall_ping
configure_firewall_ping
function_check firewall_drop_telnet
firewall_drop_telnet
function_check configure_firewall_for_dns
configure_firewall_for_dns