Legal:
This document is copyright Jim Brooks © 2003.
Permission to copy, distribute, link, and reformat is given on condition that authorship is indicated.
iptables -L -t nat
iptables -X doesn't flush all the tables.iptables -X iptables -t nat -F PREROUTING iptables -t nat -F POSTROUTING iptables -t mangle -F PREROUTING iptables -t mangle -F POSTROUTING
iptables -t nat -A PREROUTING -i ppp+ -p tcp --dport http -j DNAT --to 10.0.0.100--- BEGIN QUOTE --- The most common use is to set telnet & ftp control connections to "Minimum Delay" and FTP data to "Maximum Throughput". This would be done as follows, on your upstream router: # iptables -A PREROUTING -t mangle -p tcp --sport telnet \ -j TOS --set-tos Minimize-Delay # iptables -A PREROUTING -t mangle -p tcp --sport ftp \ -j TOS --set-tos Minimize-Delay # iptables -A PREROUTING -t mangle -p tcp --sport ftp-data \ -j TOS --set-tos Maximize-Throughput --- END QUOTE ---
# Syn-flood protection: iptables -A FORWARD -p tcp --syn -m limit --limit 1/s -j ACCEPT # Furtive port scanner: ptables -A FORWARD -p tcp --tcp-flags SYN,ACK,FIN,RST RST -m limit --limit 1/s -j ACCEPT # Ping of death: iptables -A FORWARD -p icmp --icmp-type echo-request -m limit --limit 1/s -j ACCEPT
Rather, a "ping of death" is a silver bullet: a single packet with an oversized payload.
BTW, modern Linux kernels (>2.4) are immune to ping-of-death.
echo 1 > /proc/sys/net/ipv4/tcp_syncookies
from a port scanner or ping flood attack, it WILL BE ACCEPTED by the first rule, won't it?
Last modified: Wed Aug 25 14:14:30 EDT 2004