• nginix TLS error with https portal

    3
    0 Votes
    3 Posts
    1k Views
    G

    That makes sense. I guess the client has software which is trying to talk to the gateway.

  • Support for RADIUS challenge

    5
    0 Votes
    5 Posts
    1k Views
    B

    Thank you guys, all your inputs are highly appreciated.

  • 22.05 issues

    Moved
    3
    0 Votes
    3 Posts
    695 Views
    GertjanG

    @backlash619 said in 22.05 issues:

    broke my captive portal, authentication servers don't work anymore,

    If you're using the pfSEnse "freeradius3 0.15.7_33"package as an auth server, give it some more tries.
    And detail your config.

    22.05 + pfSEnse "freeradius3 0.15.7_33" works for me ©®
    It's being used by the most comprehensive type of clients : tourists in a hotel.

  • Used voucher db with strange content

    5
    0 Votes
    5 Posts
    863 Views
    GertjanG

    @refugeesonline said in Used voucher db with strange content:

    Anyone having the same or similar problems? Or any idea?

    The thing is, if I recall the entire forum (and I can't / don't, although I'm posting here since a decade or so), you are the first I see posting about a voucher usage on a big scale.
    And its not one set up, but multiple setups 190.

    My advise is : start logging.
    Not using the GUI, as the GUI probably offer 'close to none' possibilities here.
    I would add lines lines like :
    log_error("This is a log line in file abcd.php");

    This line will get shown in the System main log like this :

    94c4c696-f55f-406c-b376-f67b639b7351-image.png

    change abcd for the file name you placed your log line.
    You can / should add variables.

    I don't have much experience with vouchers, I just played with them, by creating some 30 minutes vouchers and use them, and see how they time out of the preset time.
    That is, I know, that if a voucher is used for the first time, and it's 'valid', the voucher code will get entered in the 'used voucher' database (probably the SQLITE3 PHP database file that is kept for every portal).

    The captive portal uses a 'mini cron' process :

    53161 - Is 0:00.00 /usr/local/bin/minicron 60 /var/run/cp_prunedb_cpzone1.pid /etc/rc.prunecaptiveportal cpzone1

    that runs every 60 seconds, the function captiveportal_prune_old() in /etc/inc/captiveportal.inc gets called. That's where the magic is happening.

    The good news is : nothing magic is going on. See for yourself. Its plain vanilla PHP - PHP was removed from the rocket science list in 1999.

    @refugeesonline said in Used voucher db with strange content:

    26.000 used vouchers

    Vouchers are created, and you can print them out.
    They are not known to the captive portal authentication system at this moment. They are generated, and you print them.
    If 26000 vouchers are shown as used, then they had to be typed in by some one one by one.

    Vouchers are active the moment they get entered.
    The voucher code identifies the duration of the "roll" it belongs.
    The voucher stays valid while ("enter date/time" + "roll duration") < "current time".

    Here is the test : https://github.com/pfsense/pfsense/blob/9490042fdaafa481bcf131f3805dcc9022d973f1/src/etc/inc/captiveportal.inc#L654

    Sorry not being able to help you more.

  • Captive portal blocking ICMP

    2
    0 Votes
    2 Posts
    562 Views
    GertjanG

    @full-malito

    What is your pfSense version ?

    What your are your captive portal firewall rules ?
    What happens when you put in place the rule you've found when you installed pfSense ?

  • Shorten Voucher

    2
    0 Votes
    2 Posts
    519 Views
    GertjanG

    @joaobruno said in Shorten Voucher:

    vouchers of up to 6 digits

    The same questions was asked, way back in time, on this forum.
    My "find", at the top of the screen, is somewhat broken (I'm using a small phone right now), I advise you to find and look for yourself what can be done to make the voucher code smaller.

  • Captive portal not working on VLAN?

    2
    0 Votes
    2 Posts
    781 Views
    GertjanG

    @full-malito

    Hi,

    VLAN, or not, the captive portal doesn't care.
    For the captive portal, it's just another LAN type interface.

    @full-malito said in Captive portal not working on VLAN?:

    (just enabling DHCP server and NAT),

    You use the DHCP server on every LAN interface, even when you don't need it ;)
    ON a portal type interface, where you don't know if people have set up a correct static IP setup (changes are close to zero), you need a DHCP server.
    You'll be needing a working DNS server, the default unbound setup will do just fine.

    Why you talk about NAT ??

    NAT rules and related firewall rules are needed for your local services that you need to make accessible for devices somewhere on the Internet. NAT has nothing to do with a captive portal.

    I know, this one : Captive Portal on pfSense 2.3/2.4 is old. But it's still very useful to make a working portal in < 5 minutes.
    First, go vanilla.
    It works.
    Then : add your VLANs. If thats breaks, you'll know where to look ;)

  • Captive Portal Templates free & simple

    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • pfsense 2.5.2 can't auto delete pass-through MAC after voucher expired

    11
    0 Votes
    11 Posts
    2k Views
    LadiesMan217L

    @tianakex Hi may I know if this patch also works on pfsense 2.6?

  • CP Voucher Sync

    Moved
    5
    0 Votes
    5 Posts
    1k Views
    JeGrJ

    @jimp said in CP Voucher Sync:

    I don't see us directing any resources toward changing that, but if someone were to propose and develop a solution as a pull request that wasn't too disruptive we could consider it.

    Totally get where you're coming from and understand that. I'll consider that as a possibility as it would be a nice bit of work. As I have one or two students with there final thesis linig up, perhaps we can throw a bit of work into this. Thanks for the idea :)

  • Solve 30 days voucher errors that logout users before expiry time.

    1
    0 Votes
    1 Posts
    381 Views
    No one has replied
  • Enable or Disable Single Vouchers Roll.

    3
    0 Votes
    3 Posts
    689 Views
    RaymondChaukeR

    @nogbadthebad Submitted, Thanks a lot.

  • Auto connect IPhone to Captive Portal

    3
  • PFsense 2.6.0 using a Captive portal without landing page

    3
    0 Votes
    3 Posts
    764 Views
    B

    Hello Gert-Jan,

    Thank You. i'm going to use the portal :)

  • Block Wi-Fi sharing through mobile Hotspot !

    7
    1 Votes
    7 Posts
    2k Views
    GertjanG

    @sparktcs said in Block Wi-Fi sharing through mobile Hotspot !:

    Dear members,
    We are seeking valuable solution from PFsense members on how to restrict/block users that are connected to the devices using another hotspot.
    Like for example :- We have wireless solution with voucher guest control (Captive Portal) and issuing limited period single user vouchers to users. Now, we came to know that,users are misusing the issued vouchers by sharing their connection to other customer through his mobile hotspot facility. As far as our concerned, this is major loophole and needs to be restrict/block at the earliest.
    I hope the the issue above is clear and awaiting for somebody to help us to solve the issue as much as earlier.
    Really appreciated any one prompt response.

    Sorry for the late answer.

    A "Netgate TAC Word Class black card VIP" member access won't give you an answer.
    As this issue can not be solved - period.

    It's not a pfSense problem.
    Its a router after a router problem.
    pfSense being the first router - and the device sharing the connection being the second.

    Now go to Youtube, enter the search phrase "what is a IPv4 router - how does it work ?", look some videos, came back here and say " ..... wtf, this is an real issue, and can't be solved ".

    Example,
    Your ISP gives you a connection, with some IP like a.b.c.d./32
    You slide in the RJ45 Ethernet cable in your PC, set up your NIC so it has a.b.c.d mask 255.255.255.255 - you add a DNS, add a gateway, the ISP gave you one, and know, your are connected !!!

    You'll say : one I, one IP ? What about all my other xx devices @home ?
    Well, initially, you had to open xx number of connections to your ISP. Easy.

    But routers were defined. And 'local RFC1918 networks.

    It works like this : on the local LAN, all devices can talk to each other as one big family.
    Resources that are not on your LAN, like youtube.com (sorry : 216.358.209.238) do not "match" the local network (192.168.1.0/24) so the request is send to the local gateway : your router.
    The router takes the incoming LAN IP (like 192.168.1.10 port 443, MAC aa.bb.cc.dd.ee.ff) as the "source" and initiates a TCP/IP session behalf of you on the WAN side, to "216.358.209.238 port 443". Answers coming back from the TCP session are converted back to 192.168.1.10, using the original requester port (not 443 per se).
    Keep in mind that the 216.358.209.238 (youtube) never even sees the WAN MAC of the router (let alone le LAN PC MAC).
    The beauty is : 216.358.209.238 will only see requests coming from your WAN IP, 216.358.209.238 can not see that these requests came from 192.1638.1.10 - or 192.168.1.253, or 192.168.1.58 etc. That info is on the routers WAN interface.
    Internal states in the router keeps track of the "what TCP session belongs to what device on LAN".
    And, no, you can "see" this state table on the WAN side. That would be a security risk.

    So, no, on the captive portal (just a LAN) you see "one" connected user == one IP, one MAC, and you can suspect that that single "user" using one voucher is actually generating the traffic of many users behind this "user" - as this user is a router.
    Because all traffic is https these days (http is dead) you can't see a thing.
    Don't feel alone here. The NSA/CIA/KGB/FBI can't see (decrypt) neither here : welcome to the club : you can't 'crack' https (TLS).

    So, as

    @nogbadthebad said in Block Wi-Fi sharing through mobile Hotspot !:

    It's an issue with the users.

    said, it's a "user" thing.
    When you suspect a user abuses his voucher contract, throw him of the portal.
    But be careful, you can suspect, never be really sure.

    Btw : in a near future, when when IPv4 finally dies and IP traffic is all IPv6, there are possibilities as a single IPv6/128 can't be sub routed anymore.

    Btw2: there were some tests with the TTL field in the TCP header, as every router hop decreases this field by one, but this wasn't really conclusive.
    If I'm not mistaken, this was discussed in this forum, a decade or so ago.

  • 1 Votes
    3 Posts
    1k Views
    RaymondChaukeR

    @stephenkwabena

    I placed a feature request. I do hope that it will be available soon.

  • Internet Drop

    3
    0 Votes
    3 Posts
    883 Views
    C

    Hello @ahsunh, I'm pretty sure with 2 and 3. I'm not sure what you mean by no.1, I'll have to look it up. But my dcpinger is working

  • 0 Votes
    1 Posts
    570 Views
    No one has replied
  • Auto connect IPhone to Captive Portal

    1
    0 Votes
    1 Posts
    408 Views
    No one has replied
  • multiple html files? (different languages)

    4
    0 Votes
    4 Posts
    1k Views
    H

    should be fairly simple with some php or javascript bs

    something like:
    https://github.com/knuch/js-lang-redirect
    or
    https://stackoverflow.com/questions/66438076/redirect-user-based-on-their-language-preference-in-js
    or
    https://stackoverflow.com/questions/18098528/detecting-browser-language-in-php-and-redirect
    or
    https://stackoverflow.com/questions/41995878/php-language-redirect-automatically

    you could also not redirect but use a case statement to include the different languages as required.

Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.