From: <ma...@ju...> - 2009-10-30 19:44:08
|
Hi all, We have setup endian firewall with two wan connections. There is a requirement to route traffic from certain ips over a fast link between certain hours and there after root all traffic over slower, cheaper, links. I have added the following to the /var/efw/inithooks/rc.local.firewall script. ---------------- case "$1" in start) iptables -t mangle -I PREROUTING 1 -m time --timestart 07:30 --timestop 20:30 --days Mon,Tue,Wed,Thu,Fri -s 192.168.1.0/24 -j MARK --set-mark 4 iptables -t mangle -I PREROUTING 1 -m time --timestart 07:30 --timestop 14:30 --days Mon,Tue,Wed,Thu,Fri -s 192.168.12.0/24 -j MARK --set-mark 4 ;; stop) echo "Removing custom, time based, iptables rules for routing traffic over wimax" iptables -t mangle -D PREROUTING 1 iptables -t mangle -D PREROUTING 2 ;; reload) ## add your 'reload' rules here ;; *) echo "Usage: $0 {start|reload|stop}" esac --------------------- We then added the following to /var/efw/start.local #!/bin/sh ip route add table 4 default via xx.xx.xx.xx #(xx.xx.xx.xx is the ip of a uplinks default gateway) ip rule add fwmark 4 table 4 exit 0 However although we see the stat counter on the iptables ruls increasing and can log the hits on the rules the routing does not appear to have any effect. What is wrong? Any ideas? thanks Mark |