Creating my own captive portal software

Hi there guys,

First of all, i've thoroughly searched to see if all my questions have already been answered and haven't really found a definitive answer. I'm quite new to OpenWRT so my apologies if i'm asking stupid questions.

This topic is probably gonna be quite long since I try to describe what i want as clear as possible.

I'm running a captive portal service for my clients, and currently we pre-program the routers with firmware of a service that we use. However, this service proves to be too buggy and the developers disappoint me in ways of professionality - not fixing bugs, slow responses, etc. Because of this, we have chosen to create our own software and no longer be dependant on anyone.

I am a web developer, so the portal system itself shouldn't be a problem. However, I do have a few questions about setting up OpenWRT, which is why I started this topic. The hardware we use for most clients is a simple TP-LINK WR841N (v13).

As i've read on the following page, I gather that CoovaChilli should be perfect for my purposes.
https://openwrt.org/docs/guide-user/services/captive-portal/wireless.hotspot.coova-chilli

However, this needs to communicate with a RADIUS server and I have 0 experience with that, but in the past i've worked extensively with Linux distributions and networking set-ups, so i think i'm capable enough - i'm talking ancient history though, like 18 years ago, working with Slackware and the various BSD distributions.

This page explains how to set it up with HotSpotSystem, which is another service like the kind that I aim to replace. So, can anyone explain to me basically how this will work if i do it stand-alone?

I gather the CoovaChilli package needs to be installed on the router on which OpenWRT is already installed, and then should be configured to communicate with a RADIUS server. Where is this RADIUS server supposed to run, will it also run on the router? Or will it run on a server remote to my client's router? E.g. do I set up a VPS with a RADIUS server on it? Which software is best for this purpose?

Can I remotely contact the client routers to change settings such as bandwidth provisioning and the name of the hotspot?

I don't think i need to contact the router for anything else, since most things will be configured on the "Captive Portal" side of things, which i will have no problems with programming (Facebook authentication, Vouchers, etc).

TL;DR summary: How do I set up a TP-LINK WR841N v13 router to send users to a specific URL (unique for every one of my clients) and send back the authentication once the user is allowed to use internet?

Thanks a lot!

This has the very minimum hw specs, for what you want to do. Although, more is better. You do the standard mistake of an amateur, although claiming to have some experience: First to choose the hw, and then to throw all kind of functions at it.
Second, as usage of coovachilli is some type of "Black Magic", with a steep learning curve, first do it on a real LINUX server, before trying it on openwrt. As most of your questions are not openwrt-specific.
Having implemented such hotspot-systems several times already for a living (i.e. wifibusDOTcomDOTmx), feel free to contact privately.

1 Like

Hi, I suppose you're right. The experience I have is obviously not creating hotspot software. :wink:

The hardware is chosen because it's a cheap router for my purpose.

Will the RADIUS server run on the router as well? I assume it will run separately, right?

If i were to contact you privately, how would I go about that? I don't see a way to PM you on this forum.

  1. There are alternatives, similar price range, but better resources (RAM !).
  2. RADIUS most likely on separate (central) server (although not requirement) as I assume, you will do something with RADIUS data :slight_smile: Such a server you will need anyway, for social auth etc. (I can also do this one).
  3. You might email to augustus_meyer@yahoo.de
1 Like

Great, I have sent you an email. If anyone else has any tips for me, they're always welcome of course!

I've been doing exactly this for quite a few years, I started with coovachill back in 2011 but quickly changed after I discovered it's not fast enough on most routers due to the way it routes traffic through a tunneling interface. Maxes out at about 30mbits, no good for use on fast internet connections. I moved to using wifidog and extensively modified it, added a DHCP server to it and wrote the controller server from scratch in php/MySQL. One important change I did to my version of wifidog was the ability to issue commands in the openwrt console remotely, this is done via a ping thread which sends a http heartbeat to the server every 5 min, this also tells the server that the hotspot a online and alerts the hotel operator via email if it goes offline, from this everything can be remotely managed. The controller server does all the authentication, generates the voucher codes and handles credit card payments via paymentexpress.com. I compile wifidog and all my default settings directly into the openwrt lede firmware, remote upgrades are done also via wget and a hash check then finally the sysupgrade command. There's no radius server required with wifidog as its all done over http, which is good for some customers where their internet connections are locked down and only certain outgoing ports are allowed - I found that coovachilli couldn't communicate with the radius server when the hotspot was plugged into some corporate networks as they use firewalls like Fortigate which lock everything down only allow known well used services like http and ftp. If you want to try my firmware it's at zappie dot net.

  1. Reason for tun-interface is the ability to throttle upstream/downstream traffic. How do you do this ? 30MBit/s are good enough for hotspots in restaurants/bars etc., as 1MBit/s per ACTIVE_CONCURRENT user is reasonable.
  2. Using a VPN is standard now. For direct access to console. But not only.
  3. Standard. Also to be done via VPN.
  4. MAY_BE . However, RADIUS implements quite a few functions, like traffic throttle, volume limit, session-limit etc. in a standardized way.
    Also, for re-occuring users, auto-login using MAC is easy to implement. You do all this within your firmware ?
    As a last resort, in case no external RADIUS reachable, because of corporate policy, openwrt-router can implement local radius.

@reinerotto

  1. Most of my sites are in New Zealand in accommodation's, the majority of them are all on fast fiber optic or VDSL connections > 50mbits. The standard for fiber here is 100mbits. If throttling is required, this can be done also - there was a wifidog pull request I used https://github.com/wifidog/wifidog-gateway/pull/232 which does this and works well. 30mbits is not enough when there's 50+ devices connected and people wanting to watch netflix, youtube etc... without buffering.
  2. I've also found that VPN ports can sometimes be blocked on corporate networks, I did start off with using a VPN with coova-chilli and ran into this issue resulting in the loss of a customer.
  3. I've found that using the ping thread to issue remote commands works for my requirements, I have a list of pre-defined uci commands the controller server will push out to routers such as changing the ssid and channel # etc... Also with firmware updates, as long as the firmware is tested first locally in the lab and hash checks are done, there's no issues. I wrote a shell script which downloads the sysupgrade file, performs a hash check, then flashes - then on first boot the server pushes out the initial config via the ping thread.
  4. I made some additional changes to wifidog also around the way it handles volume and session limits also, previously the auth thread queried the server every 30secs or so to report used bytes only, the server had to determine when to disconnect a device and reply with the AUTH_DENIED command. I changed this so that wifidog now keeps an internal record of used bytes and time in some additional variables in the client list struct, the server sends the max bytes and max time in the initial auth request and wifidog does the rest, then after that there is only one update request every 5min to update the server for reporting purposes or an update request is sent immediately if the device logs out or runs out of bytes/time.
    Mac auth is also possible without redirection to the captive portal, users just add the mac to their account - they can do it with one click after logging in on a device - this is why I integrated a DHCP server with wifidog so it can catch the devices mac address and authorize it before the device receives an ip address and tries to test for the presence of a captive portal, it get's the mac from the initial dhcp discover request and the client list is used as the dhcp table.
2 Likes
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:42) Starting DHCP Server on interface br-zap
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:64) DHCP Interface: br-zap
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:65) DHCP Server Address: 100.88.66.1 - 64584201
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:66) DHCP Port: 67
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:67) DHCP Lease Time: 00000258
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:68) DHCP Gateway: 100.88.66.1 - 64584201
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:69) DHCP Subnet: 255.255.255.0 - ffffff00
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:70) DHCP DNS1: 8.8.8.8 - 08080808
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:71) DHCP DNS2: 8.8.4.4 - 08080404
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:72) DHCP Start Address: 100.88.66.2 - 64584202
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:73) DHCP End Address: 100.88.66.254 - 645842fe
[6][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:74) DHCP Next Pool Address: 100.88.66.2 - 64584202
[7][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:107) DHCP: Entering main dhcp loop
[7][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:118) memset()
[7][Fri Aug  3 22:37:12 2018][2784](dhcp_server.c:120) DHCP: recvfrom()
[5][Fri Aug  3 22:37:12 2018][2784](httpd_thread.c:58) Waiting for connections
[5][Fri Aug  3 22:37:12 2018][2784](httpd_thread.c:58) Waiting for connections
[5][Fri Aug  3 22:37:12 2018][2784](httpd_thread.c:58) Waiting for connections


[7][Fri Aug  3 22:37:13 2018][2784](simple_http.c:124) HTTP Response from Server: [HTTP/1.1 200 OK

Pong
Command: iptables -A Zappie_br-zap_Global -d 125.236.xx.xx/32 -j REJECT;iptables -A Zappie_br-eap_Global -d 125.236.xx.xx/32 -j REJECT;ntpd -q -p us.pool.ntp.org;
]
[6][Fri Aug  3 22:37:13 2018][2784](ping_thread.c:240) Auth Server Says: Pong
[6][Fri Aug  3 22:37:13 2018][2784](ping_thread.c:101) Auth server returned command: iptables -A Zappie_br-zap_Global -d 125.236.xx.xx/32 -j REJECT;iptables -A Zappie_br-eap_Global -d 125.236.xx.xx/32 -j REJECT;ntpd -q -p us.pool.ntp.org;
[6][Fri Aug  3 22:37:13 2018][2784](ping_thread.c:248) Executing Command: iptables -A Zappie_br-zap_Global -d 125.236.xx.xx/32 -j REJECT;iptables -A Zappie_br-eap_Global -d 125.236.xx.xx/32 -j REJECT;ntpd -q -p us.pool.ntp.org;
[7][Fri Aug  3 22:37:13 2018][2784](util.c:126) Waiting for PID 3377 to exit
[7][Fri Aug  3 22:37:13 2018][2784](util.c:135) Process PID 3377 exited
[7][Fri Aug  3 22:37:13 2018][2784](util.c:137) Exit status for PID 3377 is 0


[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:122) DHCP: 300 bytes received
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:135) DHCP: Queue the message for the msg_handlers to process
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:118) memset()
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:178) DHCP: Processing request
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:179) DHCP: handle_msg
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:152) DHCP: Message type: packet->op dec=1, hex=01
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:153) DHCP: Hardware type: packet->htype dec=1, hex=01
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:154) DHCP: Hardware address length: packet->hlen dec=6, hex=06
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:155) DHCP: Hops: packet->hops dec=0, hex=00
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:156) DHCP: Transaction ID: packet->xid dec=1468000759, hex=577fe9f7
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:120) DHCP: recvfrom()
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:157) DHCP: Seconds elapsed: packet->secs dec=0, hex=0000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:158) DHCP: Bootp flags: packet->flags dec=0, hex=0000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:159) DHCP: Client IP address: packet->ciaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:160) DHCP: Your Client IP address: packet->yiaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:161) DHCP: Next server IP address: packet->siaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:162) DHCP: Relay agent IP address: packet->giaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:163) DHCP: Client MAC address: packet->chaddr=90,3c,92,45,89,e2
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:164) DHCP: Client hardware address padding: packet->chaddr=0,0,0,0,0,0,0,0,0,0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:165) DHCP: Server host name: packet->sname=
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:166) DHCP: Boot file name: packet->file=
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:173) DHCP: Magic cookie dec=1669485411, hex=63825363
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=53
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=1
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=55
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=7
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=57
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=2
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=61
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=7
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=51
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=4
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=12
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=14
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=255
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:279) DHCP: dhcp option padding null
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:195) DHCP: Starting request
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:271) DHCP: Dispatching packet
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:303) DHCP packet type 1 received
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:308) DHCP: Received discover packet, preparing responce
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:336) DHCP: Do discover
[6][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:45) DHCP: Client mac is: 90:3c:92:45:89:e2
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:49) Locking client list
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:49) Client list locked
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:98) DHCP: Mac 90:3c:92:45:89:e2 doesnt yet have an address assigned
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:26) DHCP: Converting to IP string from 64584202
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:125) DHCP: Checking if we can use: 100.88.66.2 [64584202]
[6][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:157) DHCP: Allocating 100.88.66.2 [64584202] to 90:3c:92:45:89:e2
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:159) DHCP: Adding to client list and checking if client mac is on auth server whitelist
[7][Fri Aug  3 22:38:09 2018][2784](http.c:314) Adding new dhcp client 100.88.66.2 [90:3c:92:45:89:e2] on interface br-zap
[6][Fri Aug  3 22:38:09 2018][2784](client_list.c:145) Added a new client to linked list 100.88.66.2 [90:3c:92:45:89:e2] on br-zap Token: unauthenticated
[7][Fri Aug  3 22:38:09 2018][2784](auth.c:183) Unlocking client list
[7][Fri Aug  3 22:38:09 2018][2784](auth.c:183) Client list unlocked
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:321) Locking config
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:321) Config locked
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:371) Level 1: Calculated 1 auth servers in list
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:387) Level 1: Resolving auth server [www.zappie.net]
[7][Fri Aug  3 22:38:09 2018][2784](util.c:185) Locking wd_gethostbyname()
[7][Fri Aug  3 22:38:09 2018][2784](util.c:185) wd_gethostbyname() locked
[7][Fri Aug  3 22:38:09 2018][2784](util.c:198) Unlocking wd_gethostbyname()
[7][Fri Aug  3 22:38:09 2018][2784](util.c:198) wd_gethostbyname() unlocked
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:446) Level 1: Resolving auth server [www.zappie.net] succeeded = [120.138.19.19]
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:484) Level 1: Connecting to auth server www.zappie.net:80
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:513) Level 1: Successfully connected to auth server www.zappie.net:80
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:323) Unlocking config
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:323) Config unlocked
[7][Fri Aug  3 22:38:09 2018][2784](centralserver.c:329) Connected to auth server
[6][Fri Aug  3 22:38:09 2018][2784](http.c:72) Hashing sha256 parameter [6D5BC50490127A1A6013F34D24CD739E844D7B8EE2F19B1D4FD3F3XXXXXXXX]
[7][Fri Aug  3 22:38:09 2018][2784](simple_http.c:77) Sending HTTP request to auth server: [GET /control/aaa_zappie.php?stage=framed&type=notset&zone_id=91&router_id=186&router_ip=100.88.66.1&router_mac=C2-56-27-CB-8E-FA&client_ip=100.88.66.2&client_mac=90-3C-92-45-89-E2&incoming=0&outgoing=0&sessionid=unauthenticated&sh=6D5BC50490127A1A6013F34D24CD739XXXXXX HTTP/1.0
User-Agent: Zappie Gateway 1.3.0
Host: www.zappie.net

]

[7][Fri Aug  3 22:38:09 2018][2784](simple_http.c:87) Reading response
[7][Fri Aug  3 22:38:09 2018][2784](simple_http.c:111) Read 479 bytes
[7][Fri Aug  3 22:38:09 2018][2784](simple_http.c:124) HTTP Response from Server: [HTTP/1.1 200 OK

Auth: 9 - AUTH_MACDENIED
Reason: Insufficient prepaid data remaining]
[6][Fri Aug  3 22:38:09 2018][2784](centralserver.c:83) Auth server returned authentication code 9
[7][Fri Aug  3 22:38:09 2018][2784](auth.c:198) Locking client list
[7][Fri Aug  3 22:38:09 2018][2784](auth.c:198) Client list locked
[6][Fri Aug  3 22:38:09 2018][2784](auth.c:274) Got AUTH_MACDENIED while mac authenticating 100.88.66.2 [90:3c:92:45:89:e2]
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:172) Unlocking client list
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:172) Client list unlocked
[7][Fri Aug  3 22:38:09 2018][2784](ip_allocator.c:174) DHCP: Allocate IP address: 64584202
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:18) DHCP: Adding option 53, hex value=02
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:42) DHCP: Adding option 54, hex value=64584201
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:42) DHCP: Adding option 51, hex value=00000258
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:42) DHCP: Adding option 3, hex value=64584201
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:42) DHCP: Adding option 1, hex value=ffffff00
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:68) DHCP: Adding option 6, hex value1=08080808, hex value2=08080404
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:322) DHCP: serialize, packet=-1225737552
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:359) DHCP: Message type: packet->op dec=2, hex=02
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:360) DHCP: Hardware type: packet->htype dec=1, hex=01
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:361) DHCP: Hardware address length: packet->hlen dec=6, hex=06
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:362) DHCP: Hops: packet->hops dec=1, hex=01
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:363) DHCP: Transaction ID: packet->xid dec=1468000759, hex=577fe9f7
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:364) DHCP: Seconds elapsed: packet->secs dec=0, hex=0000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:365) DHCP: Bootp flags: packet->flags dec=0, hex=0000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:366) DHCP: Client IP address: packet->ciaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:367) DHCP: Your Client IP address: packet->yiaddr dec=1683505666, hex=64584202
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:368) DHCP: Next server IP address: packet->siaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:369) DHCP: Relay agent IP address: packet->giaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:370) DHCP: Client MAC address: packet->chaddr=90,3c,92,45,89,e2
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:371) DHCP: Client hardware address padding: packet->chaddr=0,0,0,0,0,0,0,0,0,0
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:372) DHCP: Server host name: packet->sname=
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:373) DHCP: Boot file name: packet->file=
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:398) DHCP: Magic cookie dec=1669485411, hex=63825363
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=53, length=1
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=54, length=4
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=51, length=4
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=3, length=4
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=1, length=4
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=6, length=8
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:428) DHCP: total 300 bytes writen
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:210) DHCP: Setting unicast ip to response->yiaddr 64584202
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:227) DHCP: Unicasting packet to [90:3c:92:45:89:e2] 64584202
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_send.c:101) DHCP: Interface br-zap, MAC address [c2:56:27:cb:8e:fa]
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_send.c:110) DHCP: Index for interface br-zap is 15
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:247) DHCP: Sent 300 bytes
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:248) DHCP: Freeing response packet from memory
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:290) DHCP: free_packet, packet=-1225737552
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:256) DHCP: Freeing request packet from memory
[6][Fri Aug  3 22:38:09 2018][2784](dhcp_packet.c:290) DHCP: free_packet, packet=-1226359088
[7][Fri Aug  3 22:38:09 2018][2784](dhcp_server.c:263) DHCP: Freeing message packet form memory
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:122) DHCP: 300 bytes received
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:135) DHCP: Queue the message for the msg_handlers to process
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:118) memset()
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:120) DHCP: recvfrom()
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:178) DHCP: Processing request
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:179) DHCP: handle_msg
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:152) DHCP: Message type: packet->op dec=1, hex=01
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:153) DHCP: Hardware type: packet->htype dec=1, hex=01
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:154) DHCP: Hardware address length: packet->hlen dec=6, hex=06
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:155) DHCP: Hops: packet->hops dec=0, hex=00
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:156) DHCP: Transaction ID: packet->xid dec=1468000759, hex=577fe9f7
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:157) DHCP: Seconds elapsed: packet->secs dec=1, hex=0001
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:158) DHCP: Bootp flags: packet->flags dec=0, hex=0000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:159) DHCP: Client IP address: packet->ciaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:160) DHCP: Your Client IP address: packet->yiaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:161) DHCP: Next server IP address: packet->siaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:162) DHCP: Relay agent IP address: packet->giaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:163) DHCP: Client MAC address: packet->chaddr=90,3c,92,45,89,e2
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:164) DHCP: Client hardware address padding: packet->chaddr=0,0,0,0,0,0,0,0,0,0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:165) DHCP: Server host name: packet->sname=
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:166) DHCP: Boot file name: packet->file=
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:173) DHCP: Magic cookie dec=1669485411, hex=63825363
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=53
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=1
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=55
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=7
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=57
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=2
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=61
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=7
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=50
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=4
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=54
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=4
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=12
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=14
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=255
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:218) DHCP: dhcp option length=0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:198) DHCP: dhcp option code=0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:279) DHCP: dhcp option padding null
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:195) DHCP: Starting request
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:271) DHCP: Dispatching packet
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:303) DHCP packet type 3 received
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:320) DHCP: Received request packet, preparing responce
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:413) DHCP: Do request
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:428) DHCP: request->ciaddr=0x00000000, get request_address from dhcp option
[6][Fri Aug  3 22:38:10 2018][2784](ip_allocator.c:45) DHCP: Client mac is: 90:3c:92:45:89:e2
[7][Fri Aug  3 22:38:10 2018][2784](ip_allocator.c:49) Locking client list
[7][Fri Aug  3 22:38:10 2018][2784](ip_allocator.c:49) Client list locked
[7][Fri Aug  3 22:38:10 2018][2784](ip_allocator.c:165) DHCP: found client 100.88.66.2 [90:3c:92:45:89:e2] in client list on interface br-zap
[7][Fri Aug  3 22:38:10 2018][2784](ip_allocator.c:172) Unlocking client list
[7][Fri Aug  3 22:38:10 2018][2784](ip_allocator.c:172) Client list unlocked
[7][Fri Aug  3 22:38:10 2018][2784](ip_allocator.c:174) DHCP: Allocate IP address: 64584202
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:18) DHCP: Adding option 53, hex value=05
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:42) DHCP: Adding option 54, hex value=64584201
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:42) DHCP: Adding option 51, hex value=00000258
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:42) DHCP: Adding option 3, hex value=64584201
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:42) DHCP: Adding option 1, hex value=ffffff00
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:68) DHCP: Adding option 6, hex value1=08080808, hex value2=08080404
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:322) DHCP: serialize, packet=-1225737552
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:359) DHCP: Message type: packet->op dec=2, hex=02
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:360) DHCP: Hardware type: packet->htype dec=1, hex=01
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:361) DHCP: Hardware address length: packet->hlen dec=6, hex=06
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:362) DHCP: Hops: packet->hops dec=1, hex=01
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:363) DHCP: Transaction ID: packet->xid dec=1468000759, hex=577fe9f7
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:364) DHCP: Seconds elapsed: packet->secs dec=0, hex=0000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:365) DHCP: Bootp flags: packet->flags dec=0, hex=0000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:366) DHCP: Client IP address: packet->ciaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:367) DHCP: Your Client IP address: packet->yiaddr dec=1683505666, hex=64584202
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:368) DHCP: Next server IP address: packet->siaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:369) DHCP: Relay agent IP address: packet->giaddr dec=0, hex=00000000
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:370) DHCP: Client MAC address: packet->chaddr=90,3c,92,45,89,e2
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:371) DHCP: Client hardware address padding: packet->chaddr=0,0,0,0,0,0,0,0,0,0
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:372) DHCP: Server host name: packet->sname=
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:373) DHCP: Boot file name: packet->file=
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:398) DHCP: Magic cookie dec=1669485411, hex=63825363
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=53, length=1
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=54, length=4
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=51, length=4
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=3, length=4
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=1, length=4
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:406) DHCP: add to buffer, dhcp option code=6, length=8
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:428) DHCP: total 300 bytes writen
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:210) DHCP: Setting unicast ip to response->yiaddr 64584202
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:227) DHCP: Unicasting packet to [90:3c:92:45:89:e2] 64584202
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_send.c:101) DHCP: Interface br-zap, MAC address [c2:56:27:cb:8e:fa]
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_send.c:110) DHCP: Index for interface br-zap is 15
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:247) DHCP: Sent 300 bytes
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:248) DHCP: Freeing response packet from memory
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:290) DHCP: free_packet, packet=-1225737552
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:256) DHCP: Freeing request packet from memory
[6][Fri Aug  3 22:38:10 2018][2784](dhcp_packet.c:290) DHCP: free_packet, packet=-1226359088
[7][Fri Aug  3 22:38:10 2018][2784](dhcp_server.c:263) DHCP: Freeing message packet form memory
[7][Fri Aug  3 22:38:12 2018][2784](auth.c:81) Unlock pthread_mutex_unlock()
[7][Fri Aug  3 22:38:12 2018][2784](auth.c:84) Running fw_sync_with_authserver()
[7][Fri Aug  3 22:38:12 2018][2784](firewall.c:495) Locking client list
[7][Fri Aug  3 22:38:12 2018][2784](firewall.c:495) Client list locked
[7][Fri Aug  3 22:38:12 2018][2784](firewall.c:544) No authenticated clients found in client list - not processing counters lists
[7][Fri Aug  3 22:38:12 2018][2784](firewall.c:553) Unlocking client list
[7][Fri Aug  3 22:38:12 2018][2784](firewall.c:553) Client list unlocked
[6][Fri Aug  3 22:38:12 2018][2784](firewall.c:583) Checking unauthenticated client 100.88.66.2 [90:3c:92:45:89:e2] for dhcp timeout - removing in 898 seconds
[7][Fri Aug  3 22:38:12 2018][2784](firewall.c:764) Clearing worklist client_list_destroy()
[7][Fri Aug  3 22:38:12 2018][2784](auth.c:86) Finished running fw_sync_with_authserver()


[6][Fri Aug  3 22:38:34 2018][2784](http.c:72) Hashing sha256 parameter [FBA5D71368AA95A1D5AC177A7DE5F09280XXXXXXX]
[7][Fri Aug  3 22:38:34 2018][2784](simple_http.c:77) Sending HTTP request to auth server: [GET /control/aaa_zappie.php?stage=login&type=notset&zone_id=91&router_id=186&router_ip=100.88.66.1&router_mac=C2-56-27-CB-8E-FA&client_ip=100.88.66.2&client_mac=90-3C-92-45-89-E2&incoming=0&outgoing=0&sessionid=p_12126195b64d96acca70&sh=FBA5D71368AA95A1D5AC177A7DE5F09280C5BF3CFB300542XXXXXX HTTP/1.0
User-Agent: Zappie Gateway 1.3.0
Host: www.zappie.net

]

[7][Fri Aug  3 22:38:34 2018][2784](simple_http.c:87) Reading response
[7][Fri Aug  3 22:38:35 2018][2784](simple_http.c:111) Read 536 bytes
[7][Fri Aug  3 22:38:35 2018][2784](simple_http.c:124) HTTP Response from Server: [HTTP/1.1 200 OK

Auth: 1 - AUTH_ALLOWED
CodeUser: 1
Bytes: 524288000
Time: 86400
BwDown: 10240
BwUp: 10240
Profile: 1
]
[6][Fri Aug  3 22:38:35 2018][2784](centralserver.c:83) Auth server returned authentication code 1
[6][Fri Aug  3 22:38:35 2018][2784](centralserver.c:99) Auth server returned profile code 1
[6][Fri Aug  3 22:38:35 2018][2784](centralserver.c:135) Auth server returned max download bandwidth in kbits 10240
[6][Fri Aug  3 22:38:35 2018][2784](centralserver.c:153) Auth server returned max upload bandwidth in kbits 10240
[6][Fri Aug  3 22:38:35 2018][2784](centralserver.c:171) Auth server returned max bytes 524288000
[6][Fri Aug  3 22:38:35 2018][2784](centralserver.c:189) Auth server returned max time 86400
[6][Fri Aug  3 22:38:35 2018][2784](centralserver.c:117) Auth server returned CodeUser 1
[7][Fri Aug  3 22:38:35 2018][2784](centralserver.c:297) Login type set to 1
[7][Fri Aug  3 22:38:35 2018][2784](auth.c:351) Locking client list
[7][Fri Aug  3 22:38:35 2018][2784](auth.c:351) Client list locked
[7][Fri Aug  3 22:38:35 2018][2784](auth.c:373) Setting login type to 1 for client 100.88.66.2 [90:3c:92:45:89:e2]
[7][Fri Aug  3 22:38:35 2018][2784](auth.c:377) Setting profile type to 1 for client 100.88.66.2 [90:3c:92:45:89:e2]
[7][Fri Aug  3 22:38:35 2018][2784](auth.c:382) Setting bandwidth shaping (download) to 10240 for client 100.88.66.2 [90:3c:92:45:89:e2]
[7][Fri Aug  3 22:38:35 2018][2784](auth.c:387) Setting bandwidth shaping (upload) to 10240 for client 100.88.66.2 [90:3c:92:45:89:e2]
[6][Fri Aug  3 22:38:35 2018][2784](auth.c:393) Setting maximum bytes to 524288000 for client 100.88.66.2 [90:3c:92:45:89:e2]
[6][Fri Aug  3 22:38:35 2018][2784](auth.c:398) Setting maximum time to 86400 for client 100.88.66.2 [90:3c:92:45:89:e2]
[6][Fri Aug  3 22:38:35 2018][2784](auth.c:474) Got AUTH_ALLOWED while authenticating client 100.88.66.2 [90:3c:92:45:89:e2] session id p_12126195b64d96acca70 - logging them in and redirecting back to portal
[7][Fri Aug  3 22:38:35 2018][2784](firewall.c:109) Allowing 100.88.66.2 [90:3c:92:45:89:e2] through the firewall with profile type 1
[7][Fri Aug  3 22:38:35 2018][2784](firewall.c:117) Setting auth_last_updated and counters.last_updated to current time 1533335915
[7][Fri Aug  3 22:38:35 2018][2784](fw_iptables.c:145) Executing command: iptables -t mangle -A Zappie_br-zap_Outgoing -s 100.88.66.2 -m mac --mac-source 90:3c:92:45:89:e2 -j MARK --set-mark 1
[7][Fri Aug  3 22:38:35 2018][2784](util.c:126) Waiting for PID 3449 to exit
[7][Fri Aug  3 22:38:35 2018][2784](util.c:135) Process PID 3449 exited
[7][Fri Aug  3 22:38:35 2018][2784](util.c:137) Exit status for PID 3449 is 0
[7][Fri Aug  3 22:38:35 2018][2784](fw_iptables.c:145) Executing command: iptables -t mangle -A Zappie_br-zap_Incoming -d 100.88.66.2 -j ACCEPT
[7][Fri Aug  3 22:38:35 2018][2784](util.c:126) Waiting for PID 3451 to exit
[7][Fri Aug  3 22:38:35 2018][2784](util.c:135) Process PID 3451 exited
[7][Fri Aug  3 22:38:35 2018][2784](util.c:137) Exit status for PID 3451 is 0
[7][Fri Aug  3 22:38:35 2018][2784](firewall.c:129) Adding bandwidth shaping for 100.88.66.2 [90:3c:92:45:89:e2] - 10240 down and 10240 up
[7][Fri Aug  3 22:38:35 2018][2784](bw_shaping.c:106) Executing command: tc class add dev br-zap parent 1:0 classid 1:2 htb rate 10240kbit burst 13k
[7][Fri Aug  3 22:38:35 2018][2784](util.c:126) Waiting for PID 3453 to exit
[7][Fri Aug  3 22:38:35 2018][2784](util.c:135) Process PID 3453 exited
[7][Fri Aug  3 22:38:35 2018][2784](util.c:137) Exit status for PID 3453 is 0
[7][Fri Aug  3 22:38:35 2018][2784](bw_shaping.c:106) Executing command: tc class add dev ifb0 parent 1:0 classid 1:2 htb rate 10240kbit burst 13k
[7][Fri Aug  3 22:38:35 2018][2784](util.c:126) Waiting for PID 3455 to exit
[7][Fri Aug  3 22:38:35 2018][2784](util.c:135) Process PID 3455 exited
[7][Fri Aug  3 22:38:35 2018][2784](util.c:137) Exit status for PID 3455 is 0
[7][Fri Aug  3 22:38:35 2018][2784](bw_shaping.c:106) Executing command: tc filter add dev br-zap parent 1: pref 5 handle 800::2 protocol ip u32 match ip dst 100.88.66.2/32 flowid 1:2
[7][Fri Aug  3 22:38:35 2018][2784](util.c:126) Waiting for PID 3457 to exit
[7][Fri Aug  3 22:38:35 2018][2784](util.c:135) Process PID 3457 exited
[7][Fri Aug  3 22:38:35 2018][2784](util.c:137) Exit status for PID 3457 is 0
[7][Fri Aug  3 22:38:35 2018][2784](bw_shaping.c:106) Executing command: tc filter add dev ifb0 parent 1: pref 5 handle 800::2 protocol ip u32 match ip src 100.88.66.2/32 flowid 1:2
[7][Fri Aug  3 22:38:35 2018][2784](util.c:126) Waiting for PID 3459 to exit
[7][Fri Aug  3 22:38:35 2018][2784](util.c:135) Process PID 3459 exited
[7][Fri Aug  3 22:38:35 2018][2784](util.c:137) Exit status for PID 3459 is 0
[6][Fri Aug  3 22:38:35 2018][2784](bw_shaping.c:516) Successfully setup bandwidth shaping 10.0/10.0 Mbps for client 100.88.66.2
  1. OK, you have a certain client base, which certain requirements: Streaming netflix or youtube is (almost) forbidden in public, free hotspots. Practically forbidden by traffic throttle, to allow more "standard" users doing surfing, email etc. BTW: The throttle, you mentioned, looks like downstream only.
    I have a client, originally providing public free hotspots, now going into large hotels. He simply uses a few more routers/APs running chilli. The experiments with coovas kernel-mod I do not dare :slight_smile:
  2. Your special client-base prohibits certain functions, in case you have to share infrastructure. Which is understandable, then. Different for hotspot systems, using own infrastructure up to WAN-connection. Usage of VPN offers lot of positive effetcs. I.e. several times I implemented a "clone" of openDNS, to avoid license costs because of commercial usage. Running this special DNS-service via VPN comes in very handy, although not required.
  3. Config changes or remote firmware updates via wget I also did in the past. Nowadays, "instant" config changes or command executions are implemented.
  4. Automatic. MAC-auth via RADIUS especially to be used for clients, showing up again after first explicit auth, entering their credentials. No user activity required to use MAC-auth. However, not all clients want this, in cae of ads displayed on login page. But for a hotel environment, or a payed-wifi-service, this is very convenient.

So, in summary you (had to) rebuild some "standard" functionality (i.e. RADIUS) yourself, because of special, strict requirements from your clients to fulfill. Smart solution, I have to say.

Dear (gareth41) now wifidog version 1.3.0 is not working openwrt v18.6.2
do you have solutions please i stopped by upgrade my routers.
Thank you

Would you like to share the code @gareth41? :blush:

1 Like

Can you please provide the wifidog configuration for openwrt and auth server setup process.

Now wifidog back to work openwrt 19.07.3 is perfect wifidog v1.3.4 you can upgrade and modify your router working fine. i setup my own hotspot by cloudwifizone