iptables -P INPUT DROP
开放ssh:iptables -A INPUT -p tcp --dport 22 -j ACCEPT
接受ip :iptables -A INPUT -s ip -j ACCEPT
端口转发,把80影射到8080 iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
时间: 2024-10-24 01:26:30
iptables -P INPUT DROP
开放ssh:iptables -A INPUT -p tcp --dport 22 -j ACCEPT
接受ip :iptables -A INPUT -s ip -j ACCEPT
端口转发,把80影射到8080 iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080