Ich krieg einfach kein Forwarding vom Client mehr ins Netz hin...
erst mal die Infos:
Code: Alles auswählen
lsmod | grep 'ip'
ipv6 262468 12
ipt_multiport 2112 33
ipt_MARK 2176 99
ipt_length 1792 11
iptable_mangle 2944 1
ipt_MASQUERADE 4032 1
iptable_nat 25260 2 ipt_MASQUERADE
ip_conntrack 35468 2 ipt_MASQUERADE,iptable_nat
iptable_filter 2944 1
ip_tables 18368 7 ipt_multiport,ipt_MARK,ipt_length,iptable_mangle,ipt_MASQUERADE,iptable_nat,iptable_filter
Code: Alles auswählen
#!/bin/bash
#Variable für iptables
ipt=(/sbin/iptables)
#zurück zur root
cd /
#Starten von NAT MASQUERADING TC
case "$1" in
start)
echo "Starte NAT/MASQ/TC"
modprobe ip_tables && modprobe iptable_filter && modprobe ip_conntrack && modprobe ipt_MASQUERADE
echo "1" < /proc/sys/net/ipv4/ip_forward
${ipt} -F && ${ipt} -X && ${ipt} -t nat -F && ${ipt} -t nat -X
${ipt} -A FORWARD -t filter -i eth1 -s 192.168.0.2 -j ACCEPT
${ipt} -A POSTROUTING -t nat -s 192.168.0.2 -j MASQUERADE
################
#Traffic Control
################
#TCP Acks bekommen die höchste Priorität
${ipt} -t mangle -A FORWARD -p tcp -m length --length :64 -j MARK --set-mark 10
#SSH wird bevorzugt
${ipt} -t mangle -A OUTPUT -p tcp --dport 22 -j MARK --set-mark 20
${ipt} -t mangle -A FORWARD -p tcp --dport 22 -j MARK --set-mark 20
${ipt} -t mangle -A INPUT -p tcp --dport 22 -j MARK --set-mark 20
#HTTP und einige Andere bevorzugen
${ipt} -t mangle -A OUTPUT -p tcp -m multiport --dports 80,443,21 -j MARK --set-mark 20
${ipt} -t mangle -A OUTPUT -p udp -m multiport --dports 53 -j MARK --set-mark 20${ipt} -t mangle -A FORWARD -p tcp -m multiport --dports 80,443,21 -j MARK --set-mark 20
# aMule bremsen
${ipt} -t mangle -A INPUT -p tcp --dport 4500:4999 -j MARK --set-mark 40
${ipt} -t mangle -A OUTPUT -p tcp --sport 4500:4999 -j MARK --set-mark 40
####################
#Traffic Control End
####################
;;
stop)
echo "Stopping NAT/MASQ/TC"
${ipt} -F && ${ipt} -t nat -F && ${ipt} -t nat -X
;;
*)
echo "Usage: $0 {start|stop}"
exit 1
esac
Das tc hab ich laut eurem Wiki eingerichtet...ein tc -s class show dev ppp0 ergibt:
Code: Alles auswählen
class htb 1:1 root rate 240000bit ceil 240000bit burst 2Kb cburst 1629b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 69904 ctokens: 55636
class htb 1:10 parent 1:1 prio 0 rate 40000bit ceil 80000bit burst 1604b cburst 1609b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 328704 ctokens: 164864
class htb 1:20 parent 1:1 prio 1 rate 150000bit ceil 240000bit burst 1617b cburst 1629b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 88364 ctokens: 55636
class htb 1:30 parent 1:1 prio 2 rate 40000bit ceil 240000bit burst 1604b cburst 1629b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 328704 ctokens: 55636
class htb 1:40 parent 1:1 prio 3 rate 20000bit ceil 112000bit burst 1601b cburst 1613b
Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
lended: 0 borrowed: 0 giants: 0
tokens: 656179 ctokens: 118051
Grüsse,
Larva