OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • Captive portal not using mac address correctly
« previous next »
  • Print
Pages: [1]

Author Topic: Captive portal not using mac address correctly  (Read 2512 times)

QuentinC

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
    • View Profile
Captive portal not using mac address correctly
« on: December 23, 2016, 01:17:27 pm »
Hello,

I've juste set-up my opnSense box.
I have one bridged connection between my LAN and my WLAN for the local network, one LAN for the internet access and I'm trying to setup a guest WLAN.

The wireless network works, but I'm unable to use the captive portal function.

It seems that the way to get the mac address have changed, in the logs, I get: "h0_wlan2 expires in 1005 sec" instead of the mac address.

This causes the clients to be disconnected immediately, and they cannot have internet access...

How can I fix this ?

Thanks,

Quentin
Logged

QuentinC

  • Newbie
  • *
  • Posts: 17
  • Karma: 0
    • View Profile
Re: Captive portal not using mac address correctly
« Reply #1 on: December 23, 2016, 03:38:37 pm »
I'm replying to myself, the problem is solved for me by changing this line:
                    mac = line.split('at')[-1].split('on')[0].strip()

by this one:
                    mac = line.split('at')[1].split('on')[0].strip()

in arp.py ( https://github.com/opnsense/core/blob/master/src/opnsense/scripts/OPNsense/CaptivePortal/lib/arp.py#L64 )

Have a nice Christmas day !
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • Archive »
  • 16.7 Legacy Series »
  • Captive portal not using mac address correctly
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2023 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2