changeset 466:40667c72ca98

Here we will do Load Balancing support, but later.
author Aleksandr Rybalko <ray@ddteam.net>
date Mon, 24 Sep 2012 14:16:47 +0300
parents b61a12ee8443
children 2b4ab6b5816c
files profiles/lua_web_ui/files/etc/www/lib/lb.lua
diffstat 1 files changed, 12 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/lua_web_ui/files/etc/www/lib/lb.lua	Mon Sep 24 14:16:47 2012 +0300
@@ -0,0 +1,12 @@
+
+--[[
+ipfw delete 00500 00600 00610 00620 00630
+tun0_gw=`ifconfig tun0 | grep inet | awk '{print $4;}'`
+tun1_gw=`ifconfig tun1 | grep inet | awk '{print $4;}'`
+ipfw add 00500 check-state
+ipfw add 00600 prob 0.500000 skipto 620 ip from 192.168.4.0/24 to not me keep-state
+ipfw add 00610 skipto 630 ip from 192.168.4.0/24 to not me keep-state
+ipfw add 00620 fwd $tun0_gw ip from 192.168.4.0/24 to not me
+ipfw add 00630 fwd $tun1_gw ip from 192.168.4.0/24 to not me
+
+]]
\ No newline at end of file