Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # TOS rules
- # Torrents from server, lowest priority
- iptables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j RETURN
- iptables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j CONNMARK --set-return 0x5/0x7
- iptables -t mangle -I QOSO 3 -p udp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j RETURN
- iptables -t mangle -I QOSO 3 -p udp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j CONNMARK --set-return 0x5/0x7
- ip6tables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j RETURN
- ip6tables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j CONNMARK --set-return 0x5/0x7
- ip6tables -t mangle -I QOSO 3 -p udp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j RETURN
- ip6tables -t mangle -I QOSO 3 -p udp -m mac --mac-source <mac_address> -m multiport --sports 51701:52397,63707 -j CONNMARK --set-return 0x5/0x7
- # Remote SSH from server
- iptables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> --sport 22 -j RETURN
- iptables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> --sport 22 -j CONNMARK --set-return 0x1/0x7
- ip6tables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> --sport 22 -j RETURN
- ip6tables -t mangle -I QOSO 3 -p tcp -m mac --mac-source <mac_address> --sport 22 -j CONNMARK --set-return 0x1/0x7
- # ICMP
- iptables -t mangle -I QOSO 3 -p icmp --icmp-type 8 -j RETURN
- iptables -t mangle -I QOSO 3 -p icmp --icmp-type 8 -j CONNMARK --set-return 0x1/0x7
- iptables -t mangle -I QOSO 3 -p icmp --icmp-type 0 -j RETURN
- iptables -t mangle -I QOSO 3 -p icmp --icmp-type 0 -j CONNMARK --set-return 0x1/0x7
- ip6tables -t mangle -I QOSO 3 -p icmpv6 --icmpv6-type 128 -j RETURN
- ip6tables -t mangle -I QOSO 3 -p icmpv6 --icmpv6-type 128 -j CONNMARK --set-return 0x1/0x7
- ip6tables -t mangle -I QOSO 3 -p icmpv6 --icmpv6-type 129 -j RETURN
- ip6tables -t mangle -I QOSO 3 -p icmpv6 --icmpv6-type 129 -j CONNMARK --set-return 0x1/0x7
- exec /jffs/scripts/tshape.sh
Advertisement
Add Comment
Please, Sign In to add comment