* wait for a while to surely set rules
authormitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Tue, 7 Jul 2009 14:30:18 +0000 (14:30 +0000)
committermitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Tue, 7 Jul 2009 14:30:18 +0000 (14:30 +0000)
   * sometimes fail to set rules for some unclear reason

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@18 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

iptables/setlan2wan.sh

index ca9e94a..ac9c617 100644 (file)
@@ -28,5 +28,10 @@ fi
 
 
 # set rule
+(
+sleep 60
+
 /sbin/iptables -t nat -A PREROUTING -i ${LANIF} -s ${LANMASK} -d ${WANIP} -j DNAT --to-destination ${LANIP}
 echo "set rule for access to WAN device on router node from LAN clients"
+
+) &