Bon, je ne voudrais pas me faire trop insulter en posant un sujet qui a déjja pu être traité, mais le fait est que je n'ai pas trouvé mon bonheur (?) sur le forum. Voilà:
Comme je suis régulièrement ennuyé par un utilisateur qui fait tourner eMule, je l''ai collé en DMZ, sur ORANGE, donc. Le problème c'est que l'âne me bouffe la bande passante et en plus il y a une inflation des connexions. Alors j'ai voulu le limiter à certains ports -pensant que quand tous seraient utilisés je serai tranquile- et bien en fait il s'en f.. complètement, c'est comme si j'avais rien fait. Est ce que mes règles sont déconnantes et où ?
ci dessous la sortie de iptables-save
merci d'avance pour votre aide
# Generated by iptables-save v1.2.9 on Sat Mar 27 08:31:03 2004
*filter
:INPUT DROP [6526:433106]
:FORWARD DROP [0:0]
:OUTPUT ACCEPT [42518:20964605]
:BADTCP - [0:0]
:CUSTOMFORWARD - [0:0]
:CUSTOMINPUT - [0:0]
HCPBLUEINPUT - [0:0]
MZHOLES - [0:0]
:IPSECBLUE - [0:0]
:IPSECRED - [0:0]
:LOG_DROP - [0:0]
:LOG_REJECT - [0:0]
:NEWNOTSYN - [0:0]
ORTFWACCESS - [0:0]
SCAN - [0:0]
:RED - [0:0]
:WIRELESSFORWARD - [0:0]
:WIRELESSINPUT - [0:0]
:XTACCESS - [0:0]
:ipac~fi - [0:0]
:ipac~fo - [0:0]
:ipac~i - [0:0]
:ipac~o - [0:0]
-A INPUT -j ipac~o
-A INPUT -j BADTCP
-A INPUT -p tcp -m tcp --tcp-flags SYN,RST,ACK SYN -m limit --limit 10/sec
-A INPUT -j CUSTOMINPUT
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -s 127.0.0.0/255.0.0.0 -j DROP
-A INPUT -d 127.0.0.0/255.0.0.0 -j DROP
-A INPUT -i eth0 -m state --state NEW -j ACCEPT
-A INPUT -i eth1 -m state --state NEW -j ACCEPT
-A INPUT -i ipsec+ -j ACCEPT
-A INPUT -j DHCPBLUEINPUT
-A INPUT -j IPSECRED
-A INPUT -j IPSECBLUE
-A INPUT -j WIRELESSINPUT
-A INPUT -j RED
-A INPUT -m state --state NEW -j XTACCESS
-A INPUT -m limit --limit 10/min -j LOG --log-prefix "INPUT "
-A FORWARD -j ipac~fi
-A FORWARD -j ipac~fo
-A FORWARD -j BADTCP
-A FORWARD -p tcp -m tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu
-A FORWARD -j CUSTOMFORWARD
-A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i eth0 -m state --state NEW -j ACCEPT
-A FORWARD -i eth1 -m state --state NEW -j ACCEPT
-A FORWARD -i ipsec+ -j ACCEPT
-A FORWARD -j WIRELESSFORWARD
-A FORWARD -i eth1 -o ipsec+ -j DROP
-A FORWARD -i eth1 -p tcp -m tcp --dport 80 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 443 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 110 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 20 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 21 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 25 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 4662 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 4711 -j ACCEPT
-A FORWARD -i eth1 -p tcp -m tcp --dport 1350:1400 -j ACCEPT
-A FORWARD -i eth1 -p udp -m udp --dport 80 -j ACCEPT
-A FORWARD -i eth1 -p udp -m udp --dport 4672 -j ACCEPT
-A FORWARD -i eth1 -p udp -m udp --dport 4711 -j ACCEPT
-A FORWARD -i eth1 -p udp -m udp --dport 1400:1450 -j ACCEPT
-A FORWARD -i eth1 -j DROP
-A FORWARD -m state --state NEW -j PORTFWACCESS
-A FORWARD -i eth1 -o eth0 -m state --state NEW -j DMZHOLES
-A FORWARD -m limit --limit 10/min -j LOG --log-prefix "OUTPUT "
-A OUTPUT -j ipac~i
-A BADTCP -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,PSH,URG -j PSCAN
-A BADTCP -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j PSCAN
-A BADTCP -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN -j PSCAN
-A BADTCP -p tcp -m tcp --tcp-flags SYN,RST SYN,RST -j PSCAN
-A BADTCP -p tcp -m tcp --tcp-flags FIN,SYN FIN,SYN -j PSCAN
-A BADTCP -p tcp -m tcp ! --tcp-flags SYN,RST,ACK SYN -m state --state NEW -j NEWNOTSYN
-A LOG_DROP -m limit --limit 10/min -j LOG
-A LOG_DROP -j DROP
-A LOG_REJECT -m limit --limit 10/min -j LOG
-A LOG_REJECT -j REJECT --reject-with icmp-port-unreachable
-A NEWNOTSYN -m limit --limit 10/min -j LOG --log-prefix "NEW not SYN? "
-A NEWNOTSYN -j DROP
-A PORTFWACCESS -d 192.168.1.250 -i ppp0 -p tcp -m tcp --dport 4662 -j ACCEPT
-A PSCAN -p tcp -m limit --limit 10/min -j LOG --log-prefix "TCP Scan? "
-A PSCAN -p udp -m limit --limit 10/min -j LOG --log-prefix "UDP Scan? "
-A PSCAN -p icmp -m limit --limit 10/min -j LOG --log-prefix "ICMP Scan? "
-A PSCAN -f -m limit --limit 10/min -j LOG --log-prefix "FRAG Scan? "
-A PSCAN -j DROP
-A RED -i eth2 -j ACCEPT
-A XTACCESS -d xxx.xxx.xxx.xxx -i ppp0 -p tcp -m tcp --dport 113 -j ACCEPT
-A ipac~fi -i eth0
-A ipac~fi -i eth1
-A ipac~fi -i ppp0
-A ipac~fo -o eth0
-A ipac~fo -o eth1
-A ipac~fo -o ppp0
-A ipac~i -o eth0
-A ipac~i -o eth1
-A ipac~i -o ppp0
-A ipac~o -i eth0
-A ipac~o -i eth1
-A ipac~o -i ppp0
COMMIT
# Completed on Sat Mar 27 08:31:03 2004
# Generated by iptables-save v1.2.9 on Sat Mar 27 08:31:03 2004
*nat
REROUTING ACCEPT [484320:26543083]
OSTROUTING ACCEPT [7958:402550]
:OUTPUT ACCEPT [994:44609]
:CUSTOMPOSTROUTING - [0:0]
:CUSTOMPREROUTING - [0:0]
ORTFW - [0:0]
OSTPORTFW - [0:0]
:RED - [0:0]
:SQUID - [0:0]
-A PREROUTING -j CUSTOMPREROUTING
-A PREROUTING -j SQUID
-A PREROUTING -j PORTFW
-A POSTROUTING -j CUSTOMPOSTROUTING
-A POSTROUTING -j RED
-A POSTROUTING -j POSTPORTFW
-A PORTFW -d xxx.xxx.xxx.xxx -p tcp -m tcp --dport 4662 -j DNAT --to-destination 192.168.1.250:4662
-A POSTPORTFW -s 192.168.0.0/255.255.255.0 -d 192.168.1.250 -p tcp -m tcp --dport 4662 -j SNAT --to-source 192.168.0.254
-A SQUID -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 800
COMMIT
# Completed on Sat Mar 27 08:31:03 2004