Firewall (방화벽) Configuration

created : 2020-04-07T11:36:02+00:00
modified : 2020-06-27T06:15:22+00:00

linux firewall
  • iptables

    #iptables -nL

save firewall configuration

#iptalbes-save > save_data.rules

config firwall

  • 아이피 111.222.111.222에 대해서 destination port 가 22이면 ACCEPT 하여라.

    #iptables -A INPUT -s 111.222.111.222/32 -p tcp -m state –state NEW -m tcp –dport 22 -j ACCEPT-

save configuration persistent

#apt install iptables-persistent
  • rule directory : /etc/iptables/rules.v4

    #iptables-save > /etc/iptables/rules.v4