Firewall
ssh
Monitor network
  • iftop, monitor the network activities
  • netstat -tuapn, monitor the connected network activities
  • iptables, add suspicious ips into the blocked list
  • iptables
  • Download ips of US
  • #!/bin/bash
    
    # allow the US ips
    for ip in `more us.zone`
    do
            echo $ip
            iptables -A INPUT -s $ip -j ACCEPT
            iptables -A OUTPUT -s $ip -j ACCEPT
    done
    
    # block the ips from other countries
    iptables -A INPUT -j DROP
    iptables -A OUTPUT -j DROP
    			
    Reference