UC-GZ1 crontab

@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 1852 -j DNAT --to-destination 192.168.0.61:1852
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j DNAT --to-destination 192.168.0.61:443
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 992 -j DNAT --to-destination 192.168.0.61:992
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 1194 -j DNAT --to-destination 192.168.0.61:1194
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 1852 -j DNAT --to-destination 192.168.0.61:1852
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 5555 -j DNAT --to-destination 192.168.0.61:5555
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 8888 -j DNAT --to-destination 192.168.0.61:8888
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 18106 -j DNAT --to-destination 192.168.0.61:18106
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 18158 -j DNAT --to-destination 192.168.0.61:18158
@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 18208 -j DNAT --to-destination 192.168.0.61:18208

@reboot sleep 61; /sbin/iptables -t nat -A PREROUTING -i eth0 -p udp --dport 1852 -j DNAT --to-destination 192.168.0.61:1852
@reboot sleep 65; /usr/sbin/iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

Switch to use different gateway according to the time

#!/bin/bash
NOW=`date '+%H:%M:%S'`
MORNINGTIME="06:00:00"
NIGHTTIME="20:00:00"

if [ $NOW > $MORNINGTIME ] && [[ $NOW < $NIGHTTIME ]]
then
/sbin/route add -net 0.0.0.0/1 gw 192.168.168.1
/sbin/route add -net 128.0.0.0/1 gw 192.168.168.1
/sbin/route del -net 0.0.0.0/1 gw 192.168.42.1
/sbin/route del -net 128.0.0.0/1 gw 192.168.42.1
echo "Use 192.168.168.1"
else
/sbin/route del -net 0.0.0.0/1 gw 192.168.168.1
/sbin/route del -net 128.0.0.0/1 gw 192.168.168.1
/sbin/route add -net 0.0.0.0/1 gw 192.168.42.1
/sbin/route add -net 128.0.0.0/1 gw 192.168.42.1
echo "Use 192.168.42.1"
fi