• Use internet for free then captive portal ???

    Locked
    5
    0 Votes
    5 Posts
    3k Views
    B

    @cmb:

    The "Pass-through credits allowed per MAC address" could potentially work for that. Only problem is you'd have to put a hard limit on all CP sessions equal to 1 hour to force users off after an hour for that to function. There isn't a great way to accomplish that without some custom development, you could hack it in to force only the pass-through credit users off within 1 hour. .

    thanx, i try this but its not option. i work on this, and if you have more idea, i realy appreciate that.
    thanx agin

  • [SOLVED] Is it possible for my CP link to be a FQDN?

    Locked
    4
    0 Votes
    4 Posts
    2k Views
    marcellocM

    Just prefix first post subject with [Solved].

  • Something similar to google analytics for CP login screen?

    Locked
    8
    0 Votes
    8 Posts
    3k Views
    L

    I created a simple HTML page as a custom portal, using the

    <form>code that is on the Captive Portal page as an example.. i uploaded it and i get this error that i dont know what to do about:

    Jan 5 15:31:12 php[46101]: /index.php: Captive portal could not determine client's MAC address. Disable MAC address filtering in captive portal if you do not need this functionality.

    I just have a username and a password on the form, nothing about MAC.. how do i get back to the original portal page now?</form>

  • Captive portal then Proxy server

    Locked
    9
    0 Votes
    9 Posts
    8k Views
    E

    Replied to you on that other post for you wonder and forum history.

  • Captive Portal 2.0 Import XML

    Locked
    4
    0 Votes
    4 Posts
    3k Views
    E

    Find how to use XML-RPC with pfSense.

  • Allowed Hostname Wildcards

    Locked
    12
    0 Votes
    12 Posts
    21k Views
    deltaendD

    @cmb:

    We do actually have support for wildcard hostnames in a private build right now, it's still under development and being tested, but it appears to work nicely. It just snoops all the DNS responses, and if you allow *.example.com it allows every IP that's returned via DNS for *.example.com. No extra overhead in doing additional DNS lookups or anything else crazy like that.

    When or whether that hits the open source side, I'm not sure yet.

    @deltaend:

    Does pfSense support setting up a password protected proxy system so we can program TeamViewer and other allowed programs to byass the captive portal by going through the proxy with a username/password?

    Could probably do that with Squid.

    I love you guys.  Hopefully wildcards gets some attention for the next release build as this is very important for captive portal builds.

    Regarding setting up Squid to bypass the Captive portal, it doesn't appear as if that works.  If I have both Captive portal and Squid on the same interface, Captive portal will always require authentication before allowing itself to be used as a proxy.  If I try to set up a virtual interface and bridge it with the WAN, Captive portal will throw a warning and won't turn on saying that it can't be activated on a bridged connection.  So, short of having two firewalls, I don't see another way to make that work.

  • 0 Votes
    3 Posts
    2k Views
    Q

    thanks

  • Post Submit Button from an external website

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    D

    Well, it is just about simply presentate a "Startpage", some sort of Information Portal. It is not about security or something. The goal is simply that the portal page should or better to say is managed by a CMS System. So I need the Portal Page to be hosted external. If this is messy or not is not relevant as this is what is asked for. Anyway, you never could "force" someone to read anything. If the users just want to ignore the information then they will regardless of what I am doing.

    There are already some posts about Pre-Authentication Page, but the system here will just work completly without authentication.

    The parameter just pass the initaly entert URL (if the CP woks without authentication). So if someone enter the URL www.xyz.com then the CP just make the redirect to the (local) index.php/html and then, when pressing the Button "Continue", "Accept" or whatever, the CP takes the value of the PORTAL_REDIRURL and the browser will open exactly this URL.

    When I redirect the Portal Page to external, then this information is lost, so I have to "hardcode" the Information into the Form. So the URL that is opened after clicking "Continue" will always be the one I entered and the User will have to enter the URL he wanted to reach again. That is uncomfortable for the user and the reason why I am looking for an solution…

  • Captive Portal and lusca-cache not working

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • Captive Portal Https Login

    Locked
    2
    0 Votes
    2 Posts
    5k Views
    S

    i put the ip of my server pfsense in "HTTPS sever name" and works
    i dont speak english very well…

  • How to setup captive portal with https?

    Locked
    1
    0 Votes
    1 Posts
    2k Views
    No one has replied
  • 0 Votes
    3 Posts
    3k Views
    D

    AFAIK there isn't really a good "clean" answer to this problem. If you redirected https, it would cause an alert by the user's browser.

    One exception would be if you control the client PCs' config (e.g. the PCs in an office), you could add a wildcard SSL cert to the clients, and effectively do a successful man-in-the-middle-attack.

  • Radius / netflow accounting amount bug (ipfw related)?

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    C

    m0n0wall isn't even close to the same anymore, so that has no relevance. Haven't had time to dig into it yet, of course people can always change our priorities immediately via commercial support (see link in my sig).

  • Captive portal in 2.0 Release not working?

    Locked
    47
    0 Votes
    47 Posts
    24k Views
    L

    @dhatz:

    Apparently your config file was truncated due to its size.

    You'd need to include the info between

    <captiveportal>…</captiveportal>

    I have basically 2 exact same NIC's, LAN and OPT1. Both setup exactly the same, just differente IP's obviously.

    Captive Portal enabled on both interfaces,on the LAN and connection goes straight passed the CP login screen, tried various AP's to make sure it wasnt one of them not working.  The exact same setup on the OPT1 interface works perfectly.

    I have tried by only activating CP on 1 at a time but get the same results.   This must be a bug..

    Have you considered switching the cables between LAN and OPT1?

    Ok sorry, i'll post that.

    Funny you should say that, cause its basically what i am doing right now. BUT.. this is still not a fix to the problem, just a work around..

    <captiveportal><page><timeout>1440</timeout>
    <interface>lan,opt1</interface>
    <maxproc><idletimeout>720</idletimeout>
    <freelogins_count>1</freelogins_count>
    <freelogins_resettimeout>1</freelogins_resettimeout>
    <auth_method>local</auth_method>
    <reauthenticateacct>interimupdate</reauthenticateacct>
    <httpsname><preauthurl><bwdefaultdn>2048</bwdefaultdn>
    <bwdefaultup>1024</bwdefaultup>
    <certificate><cacertificate><private-key><redirurl><radiusip>192.168.99.25</radiusip>
    <radiusip2><radiusport><radiusport2><radiusacctport><radiuskey>testing123</radiuskey>
    <radiuskey2><radiusvendor>default</radiusvendor>
    <radiussrcip_attribute>wan</radiussrcip_attribute>
    <radmac_format>default</radmac_format>
    <noconcurrentlogins><radacct_enable><reauthenticate><passthrumac><mac>00:05:9e:84:e6:20</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>00:0C:29:13:78:E0</mac></passthrumac>
    <passthrumac><mac>00:0c:29:41:51:16</mac></passthrumac>
    <passthrumac><mac>00:0c:29:44:04:2d</mac></passthrumac>
    <passthrumac><mac>00:0c:29:a3:32:e0</mac></passthrumac>
    <passthrumac><mac>00:0c:29:a4:2c:51</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>00:15:6D:4E:4E:1A</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>00:18:8b:4b:ed:f8</mac></passthrumac>
    <passthrumac><mac>00:18:8b:4b:ed:fa</mac></passthrumac>
    <passthrumac><mac>00:1B:B9:6F:25:06</mac></passthrumac>
    <passthrumac><mac>00:1D:FE:CB:53:B5</mac>
    <bw_up>2048</bw_up>
    <bw_down>1024</bw_down></passthrumac>
    <passthrumac><mac>00:1c:26:a9:fc:f4</mac>
    <bw_up>1024</bw_up>
    <bw_down>512</bw_down></passthrumac>
    <passthrumac><mac>00:1e:64:52:a0:16</mac></passthrumac>
    <passthrumac><mac>00:1f:3a:86:4A:3A</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>00:21:85:F0:31:47</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>00:26:5A:03:8C:1E</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>00:26:66:03:23:AF</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>00:26:CE:0F:57:35</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>00:27:22:2e:11:65</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>04:4F:AA:33:53:F0</mac></passthrumac>
    <passthrumac><mac>08:10:74:75:7D:44</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:7F:06</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:84:BE</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:8B:E6</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:8F:3C</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:90:32</mac>
    <bw_up>2048</bw_up>
    <bw_down>2660</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:98:9E</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:9a:9c</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:A5:06</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:A6:8C</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:A8:80</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:AB:68</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:B1:4E</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:B9:88</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:BB:52</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:75:c5:d8</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:77:FE:7E</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:78:08:8E</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:78:2C:04</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:85:FD:48</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:02:6A</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:03:70</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:07:0E</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:0a:5e</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:14:A6</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:1A:22</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:25:B6</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:26:D6</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:26:FE</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:29:82</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:2E:36</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:2F:42</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:2F:D6</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:86:30:5c</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:06:ac</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:BC:6C</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:BD:14</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:C0:70</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:C5:42</mac>
    <bw_up>2048</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:C5:F4</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:C9:FA</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:CE:58</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:CE:68</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:DA:B2</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:DC:74</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:DD:B8</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:DE:94</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:E0:B0</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:E0:E6</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:E5:D0</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:E9:6C</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:ED:F4</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F0:6A</mac>
    <bw_up>1024</bw_up>
    <bw_down>2660</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F0:A6</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F3:AA</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F6:8E</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F6:D4</mac>
    <bw_up>2048</bw_up>
    <bw_down>1024</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F7:E2</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F8:9C</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:F8:AA</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:FA:14</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:FA:40</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:FA:4C</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:FA:5C</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:FB:16</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:FD:B2</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C8:FF:F4</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C9:00:5c</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C9:00:CC</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C9:01:F0</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C9:02:9E</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:C9:04:72</mac>
    <bw_up>1536</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:c8:59:16</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:c8:ef:00</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>08:10:74:c8:f6:86</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>1C:65:9D:B3:75:42</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>78:44:76:00:9B:AE</mac>
    <bw_up>1024</bw_up></passthrumac>
    <passthrumac><mac>78:44:76:00:9D:5B</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>78:44:76:00:9a:60</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>78:44:76:00:A8:67</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>78:44:76:00:a8:62</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>78:44:76:00:b1:0e</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>90:00:4E:5A:5A:7F</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>A4:BA:DB:3D:24:5A</mac></passthrumac>
    <passthrumac><mac>AC:67:06:37:90:60</mac></passthrumac>
    <passthrumac><mac>AC:67:06:37:91:90</mac></passthrumac>
    <passthrumac><mac>B8:70:F4:92:0F:2E</mac>
    <bw_up>1024</bw_up>
    <bw_down>2048</bw_down></passthrumac>
    <passthrumac><mac>F8:7B:7A:3A:CE:7F</mac>
    <bw_up>512</bw_up>
    <bw_down>1024</bw_down></passthrumac>
    <passthrumac><mac>c8:3a:35:d2:53:cf</mac>
    <bw_up>1024</bw_up>
    <bw_down>1536</bw_down></passthrumac>
    <peruserbw><enable></enable></peruserbw></reauthenticate></radacct_enable></noconcurrentlogins></radiuskey2></radiusacctport></radiusport2></radiusport></radiusip2></redirurl></private-key></cacertificate></certificate></preauthurl></httpsname></maxproc></page></captiveportal>

  • Incorrect accounting values reported for radius accounting

    Locked
    2
    0 Votes
    2 Posts
    2k Views
    jimpJ

    It's already been reported here:
    http://redmine.pfsense.org/issues/1974

    Not sure what the ETA is on a fix for that, it seems to be a bug in ipfw

  • What kind of server is the captive portal

    Locked
    3
    0 Votes
    3 Posts
    2k Views
    D

    Perfect tons of help thanks!

  • Fatal error: Class 'SoapClient' not found error please help

    Locked
    3
    0 Votes
    3 Posts
    3k Views
    F

    thanks for reply gertjan.
    yes i put this file  ::)

    soapclient php command,  get address and contents . but dont work in pfsense.
    1- I think I have to enable soapclinet for php.
    but I do not know how to do in pfsense.
    2- How to run a phpservice service in command-line

    ps:I'm sorry my bad english skill

  • Captive Portal behind Router or different subnet

    Locked
    2
    0 Votes
    2 Posts
    6k Views
    V

    Hi sekult,

    I banged my head against this issue for quite a while. I found that in a flat network (where the client ip was on the same subnet as the LAN interface) everything worked fine, but when we changed our network topology to use vlans (and vlan routing), pfsense decided that it would remap requests to the pfsense box to use the ip address of the requested external site. While this works for login purposes (I guess there is some kind of ip masq going on), it fails epically for the the logout button (because by the time the user clicks on the logout button, the ip-masq is no longer in place, so the request tries to go to the actual external site ip.

    Trawling through the code (in /etc/inc/captiveportal.inc), I found references to portal_ip_from_client_ip(), which tries to match the client ip to one of the pfsense interface ips. But because your client ip does not match any of the interface ips, it fails.

    I found that commenting out the guts of this function, leaving only "return false;" worked for me. In this case, the code that calls portal_ip_from_client_ip(), uses the host name of the pfsense box. (for me this is 'pfsense').

    /etc/inc/captiveportal.inc ----------------------------- function portal_ip_from_client_ip($cliip) {         global $config; /*         $interfaces = explode(",", $config['captiveportal']['interface']);         foreach ($interfaces as $cpif) {                 $ip = get_interface_ip($cpif);                 $sn = get_interface_subnet($cpif);                 if (ip_in_subnet($cliip, "{$ip}/{$sn}"))                         return $ip;         }         // doesn't match up to any particular interface         // so let's set the portal IP to what PHP says         // the server IP issuing the request is.         // allows same behavior as 1.2.x where IP isn't         // in the subnet of any CP interface (static routes, etc.)         // rather than forcing to DNS hostname resolution         $ip = $_SERVER['SERVER_ADDR'];         if (is_ipaddr($ip))                 return $ip; */         return false; }

    At this point, the login/logout pages are accessed from http://pfsense:8000/  and worked fine.

    Note: I assume that you have solved the routing and firewall issues, ie;

    Added Gateway (for your LAN interface) in System | Routing | Gateways
    Added Route (to your client subnet, via your LAN interface) in System | Routing | Routes
    Added Firewall Rule (same as for "Default allow LAN to any rule", but changing 'LAN net' to your client subnet/mask)  in Firewall | Rules | LAN

    Hope this helps.

    Cheers,
    Jon

  • Radius timeout and switch to local database

    Locked
    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Normal logout page instead of pop-up - where is the pop-up code ?

    Locked
    2
    0 Votes
    2 Posts
    3k Views
    GertjanG

    Hi !

    Here it is: /etc/inc/captiveportal.inc - lines 299->332.
    As you can see in the code, the info stored in $config['captiveportal']['page']['errtext'] will be used as the logout windows.
    If not defined, a hard coded popup windows will be used.

    Your page can be defind by filling in " $config['captiveportal']['page']['errtext'] ", this can be done by supplying a file with the code on the Services => Captive portal page, you will find "Logout page contents" at the bottom.

    Btw: sending code for a (default) popup logout window or opening another browser tab (another page) will often treated equally.

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