Local-hosted portals

mbox has a unique feature to host captive portal contents on mbox itself and deliver the page contents to users locally from mbox storage space, while mbox periodically/nightly syncs with cloud-hosted server for content updates. 

In this approach, the portal contents are still centrally managed, but the user experience are significantly improved as the page contents are locally served to users without going through a public Internet connection. 

There're several advantages to let mbox deliver page contents locally from mbox:

This feature is particularly useful for TVC based advertising when mbox is used as a gateway, where users are required to view a short video before mbox allows them full Internet access. The video contents are streamed through local storage without causing congestion to backhaul link. It is also needed for customers requirement payment gateway integration which allows users to purchase WiFi access plans online (in this case HSG functions as a web server).

There're a few major notes on this feature:

NOTE: 

CONFIGURATION EXAMPLE

!!hostname mbox!interface eth0 enable ip address dhcp!interface eth1 enable bridge-group 0!interface eth2 enable bridge-group 0!interface eth3 enable bridge-group 0!interface bridge 0 enable ip address 172.16.1.1/24!!configure a local loopback Interface to serve page contentsinterface loopback enable ip address 2.2.2.2/32!!enable DNS re-write for splash.ransnet.com URLip host splash.ransnet.com 2.2.2.2 rewrite!ip name-server 8.8.8.8 8.8.4.4!!pull cloud/FTP contents to local foldermfusion portal splash.ransnet.com ftpcontent <partnerid> <customerid>!!enable redirect for DNS requests (redirect to local DNS for rewrite)firewall-dnat 10 redirect all udp dport 53 rdport 53!!allow web access for LAN users to HSG itselffirewall-input 11 permit all tcp dport 80 src 172.16.1.0/24firewall-input 12 permit all tcp dport 443 src 172.16.1.0/24!firewall-snat 1 overload outbound eth0!security radius-server client 127.0.0.1 key testing123 name LOCAL start!security hotspot br0 hotspot-owner RansNet hotspot-wan eth0 hotspot-server 172.16.1.1 ports 5001 5002 client-network 172.16.1.0 255.255.255.0 client-dhcp 172.16.1.20 255.255.255.0 lease 7200 client-dhcp-dns 172.16.1.1 client-static 172.16.1.2 255.255.255.248 client-mac-bypass 20-59-a0-cc-ad-d4,20-59-a0-cc-ae-48,20-59-a0-cc-ae-44 allowed-domain .ransnet.com!allow direct access to local URL allowed-url 172.16.1.1,2.2.2.2 redirect-url http://www.baidu.com radius-server localhost testing123 hotspot-online-portal http://splash.ransnet.com/<partnerid>/<customerid>/index.php start!

NOTE: 

Attached is a complete config example: