Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Guter Traffic Shaper fuer Linux (Gentoo) gesucht
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

Goto page Previous  1, 2  
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Flintz
n00b
n00b


Joined: 29 Sep 2004
Posts: 48

PostPosted: Wed Mar 23, 2005 12:27 am    Post subject: Reply with quote

Und noch die entsprechenden parts der Firewall:
wie gesagt hier sind auf jedenfall noch einige fehler vertreten, aber vom prinzip her sollte es gehen

Code:
#
# Create chain for Layer 7 classifier (local traffic)
#

$IPTABLES -t mangle -N local

$IPTABLES -t mangle -A INPUT -i $INET_IFACE -j local
$IPTABLES -t mangle -A OUTPUT -o $INET_IFACE -j local

.
.
.
#NORMAL and LAYER7 marking for traffic shaping
 #
 # LAN TRAFFIC
 #
 
 #$IPTABLES -t mangle -A FORWARD -m layer7 --l7proto battlefield1942 -j -MARK --set-mark 13 #BF42
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto aim -j MARK --set-mark 14
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto jabber -j MARK --set-mark 14
   
 $IPTABLES -t mangle -A FORWARD -p tcp --dport 80 -j MARK --set-mark 21 #HTTP
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto ftp -j MARK --set-mark 22 #FTP-LAN
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto pop3 -j MARK --set-mark 23 #POP3
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto imap -j MARK --set-mark 23 #IMAP
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto vnc -j MARK --set-mark 23 #VNC
 
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto shoutcast -j MARK --set-mark 24 #Shoutcast
 $IPTABLES -t mangle -A FORWARD -p tcp --dport 6667 -j MARK --set-mark 25 #IRC
 
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto edonkey -j MARK --set-mark 5
 $IPTABLES -t mangle -A FORWARD -m layer7 --l7proto bittorrent -j MARK --set-mark 5
 
 #
 # Local TRAFFIC
 #

 #$IPTABLES -t mangle -A local -m layer7 --l7proto battlefield1942 -j -MARK --set-mark 13 #BF42
 $IPTABLES -t mangle -A local -m layer7 --l7proto aim -j MARK --set-mark 14
 $IPTABLES -t mangle -A local -m layer7 --l7proto jabber -j MARK --set-mark 14

 $IPTABLES -t mangle -A local -p tcp --dport 80 -j MARK --set-mark 21 #HTTP
 $IPTABLES -t mangle -A local -m layer7 --l7proto ftp -j MARK --set-mark 22 #FTP-LAN
 $IPTABLES -t mangle -A local -m layer7 --l7proto pop3 -j MARK --set-mark 23 #POP3
 $IPTABLES -t mangle -A local -m layer7 --l7proto imap -j MARK --set-mark 23 #IMAP
 $IPTABLES -t mangle -A local -m layer7 --l7proto vnc -j MARK --set-mark 23 #VNC
   
 $IPTABLES -t mangle -A local -m layer7 --l7proto shoutcast -j MARK --set-mark 24 #Shoutcast
 $IPTABLES -t mangle -A local -p tcp --dport 6667 -j MARK --set-mark 25 #IRC

 $IPTABLES -t mangle -A local -p tcp --sport 8767 -j MARK --set-mark 31 #Teamspeak Server
 $IPTABLES -t mangle -A local -p tcp --sport 7777 -j MARK --set-mark 32 #UT2004 Server
 $IPTABLES -t mangle -A local -p tcp --sport 1234 -m layer7 --l7proto ftp -j MARK --set-mark 33 #FTP Server
 $IPTABLES -t mangle -A local -p tcp --sport 38000:40000 -m layer7 --l7proto ftp -j MARK --set-mark 33 #FTP Server
 
 $IPTABLES -t mangle -A local -p tcp --sport 80 -j MARK --set-mark 34 #HTTP Server

 $IPTABLES -t mangle -A local -m layer7 --l7proto edonkey -j MARK --set-mark 5
 $IPTABLES -t mangle -A local -m layer7 --l7proto bittorrent -j MARK --set-mark 5
      
Back to top
View user's profile Send private message
frostschutz
Advocate
Advocate


Joined: 22 Feb 2005
Posts: 2977
Location: Germany

PostPosted: Sat Mar 26, 2005 4:59 am    Post subject: Reply with quote

Für einen WG-Router habe ich ein Bash-Script geschrieben, das die verfügbare Bandbreite gerecht an alle Mitbewohner verteilt. Das Script gibt es hier:

http://www.metamorpher.de/fairnat/

Vielleicht ist es ja jemandem von Nutzen, der in einer vergleichbaren Situation ist.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum