• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

WPA2-Enterprise (EAP-TLS) User Authentication finally works on Windows 10 - how to use Computer Authentication and strip out "host/" in username?

Scheduled Pinned Locked Moved Off-Topic & Non-Support Discussion
12 Posts 4 Posters 2.0k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    Finger79
    last edited by Finger79 Apr 5, 2023, 6:46 PM Apr 4, 2023, 11:18 PM

    [Long time no post. In 2019, lightning struck either our house or just a few feet outside it, and despite using robust Zero Surge surge protectors, the lightning surge entered via coax cable --> cable modem --> ethernet and basically fried everything downstream via ethernet cable. I have since made sure our coax entrance is properly grounded (it wasn't... this isn't my house so I had no idea), plus out of an abundance of caution, I added a pair of TrendNET fiber media converters and a 2 meter OM3 cable to convert the incoming ethernet cable from the cable modem --> fiber --> back to ethernet. This way, if lightning does manage to sneak in via coax and ethernet again, it won't travel through the fiber gap. PM me for details.]

    Anyway, my 2013 pfSense box got fried and I only just now rebuilt it in 2023 using an HP t740 thin client and Supermicro Intel i350 4-port NIC. Everything restored fine from the 2019 config (2.4.4p3?) to the latest 2.6.0 release.


    My question: I have a Windows 10 Pro laptop (22H2), and I'd like to use WPA2-Enterprise EAP-TLS with it. I imported both the pfSense CA and the user certificate into the Certificates MMC snap-in. It's in 3 places:

    1. Local standard user's Personal Store (for user authentication)
    2. Local Admin user's Personal Store (for user authentication)
    3. Local machine's Personal Store (for computer authentication)

    After dealing with an issue where Windows pre-pended "host/" to the username and FreeRADIUS rejecting that in PfSense, I figured out the solution. (Tag me here or PM and I'll do a write-up.) When I log into the laptop, WiFi automatically connects. Everything is great.

    What I'd like to do is move from User Authentication to Computer Authentication in Windows. (This is a personal laptop used at home. No AD domain.) In other words, I want the laptop to connect to WiFi as soon as Windows 10 boots, before I even log in.

    In the Advanced settings in the Wireless Properties, I changed it from User to Computer Authentication, but then it gives me the darn "host/" prefix again and doesn't prompt me to manually type in a username to fix that issue.

    Any help?

    1 Reply Last reply Reply Quote 0
    • S
      stephenw10 Netgate Administrator
      last edited by Apr 5, 2023, 2:40 PM

      That's a Windows question really.
      Are you using wifi running in pfSense or external access points?

      You might be better asking in the off-topic sub to hear from Windows users.

      Steve

      F 1 Reply Last reply Apr 5, 2023, 4:45 PM Reply Quote 0
      • F
        Finger79 @stephenw10
        last edited by Apr 5, 2023, 4:45 PM

        @stephenw10 Running external APs. Very happy going with a used Ruckus AP off eBay and using the license-free Unleashed firmware.

        Very true, this question is indeed a Windows config issue unless there's some FreeRADIUS regular expression config I can do to strip off the "/host/Dell Latitude 1234" to make it "Dell Latitude 1234" so the username matches the certificate CN.

        Is it possible to move this thread over to off-topic?

        1 Reply Last reply Reply Quote 0
        • S stephenw10 moved this topic from Wireless on Apr 5, 2023, 5:05 PM
        • F
          Finger79
          last edited by Finger79 Apr 5, 2023, 7:06 PM Apr 5, 2023, 7:01 PM

          In case it's clear as mud, maybe some screenshots will help. The certificate I have installed on the laptop has a CN of "Dell Latitude 1234" (with the 1234 being the actual model of the laptop), and the user in FreeRADIUS is also "Dell Latitude 1234," so when I log into the laptop, it automatically connects to the WLAN. This is User-based authentication in Windows 10.

          The original issue I got was Windows 10 would pre-pend "host/" to the username, making it "host/Dell Latitude 1234" which wouldn't match the certificate CN, so FreeRADIUS on pfSense would reject the authentication attempt.

          Win10-prepend-host-to-username.jpg

          I found a solution though:

          user-auth-workaround.jpg

          Checking that box then prompts me to type in a username when connecting to the WLAN network:

          WiFi-type-in-username.jpg

          So in that dialog box, I simply type in "Dell Latitude 1234" and it remembers this setting forever, even across reboots. No more "host/Dell Latitude 1234" mismatches. WiFi works.

          But it only works when I'm signed in. (This is User based authentication.) What I'd like is for Computer Authentication to also work so that WiFi automatically connects upon boot (which helps with things like RDP into the laptop), but there's no workaround to get rid of the pesky way Windows automatically prepends "host/" to the username. Still get the original error in FreeRADIUS:

          Win10-prepend-host-to-username.jpg

          1 Reply Last reply Reply Quote 0
          • F
            Finger79
            last edited by Finger79 Apr 14, 2023, 9:29 AM Apr 14, 2023, 9:27 AM

            Is there anywhere on the Web I can ask to get solutions to this? I can't for the life of me figure out where to ask or what to search for. Surely I can't be the only one here trying to get WPA3-Enterprise working on a Windows laptop. (The WPA2-Enterprise in the thread title is a compromise, but it's a separate issue trying to get WPA3-Enterprise to work, and I made a thread in the Ruckus Unleashed forums, which is also not getting any replies.)

            Frustration all around.

            My end goals are:

            1. WPA3-Enterprise (EAP-TLS) working on Windows 10 laptop and my phones instead of just WPA2-Enterprise.
            2. On the Windows laptop, I'd like for WiFi to connect before I log in. This helps with e.g. if I want to RDP to the laptop from my desktop PC to do maintenance.
            A 1 Reply Last reply Apr 14, 2023, 10:13 AM Reply Quote 0
            • A
              aduzsardi @Finger79
              last edited by Apr 14, 2023, 10:13 AM

              @finger79 don't know if pfSense allows this , but freeradius has a scripting language called unlang which could possible deal with your issue for the host/ part
              https://freeradius.org/radiusd/man/unlang.html

              haven't used EAP-TLS myself , but would it possible to add a SAN to your certificate having host/Dell ... as an alternative subject name ?

              F 1 Reply Last reply Apr 14, 2023, 10:20 AM Reply Quote 1
              • F
                Finger79 @aduzsardi
                last edited by Finger79 Apr 14, 2023, 10:44 AM Apr 14, 2023, 10:20 AM

                @aduzsardi said in WPA2-Enterprise (EAP-TLS) User Authentication finally works on Windows 10 - how to use Computer Authentication and strip out "host/" in username?:

                @finger79 don't know if pfSense allows this , but freeradius has a scripting language called unlang which could possible deal with your issue for the host/ part
                https://freeradius.org/radiusd/man/unlang.html

                haven't used EAP-TLS myself , but would it possible to add a SAN to your certificate having host/Dell ... as an alternative subject name ?

                Thanks, that's a possible lead. I'll look into it.

                Edit: Oof, I wish there were some easy examples. I just need a regular expression that's like:

                "If you see a username that contains "host/foo" strip it out and only return foo for the username." I have no earthly idea where to insert this code in FreeRADIUS too. Surely there's some unlang experts on this forum.

                A 1 Reply Last reply Apr 14, 2023, 10:56 AM Reply Quote 0
                • A
                  aduzsardi @Finger79
                  last edited by aduzsardi Apr 14, 2023, 10:57 AM Apr 14, 2023, 10:56 AM

                  @finger79 this might help https://lists.freeradius.org/pipermail/freeradius-users/2011-March/052744.html

                  1 Reply Last reply Reply Quote 0
                  • J
                    jamesg246
                    last edited by Apr 5, 2024, 3:13 PM

                    Did you ever sort this one? I'm having the same issue

                    F 1 Reply Last reply Apr 5, 2024, 7:51 PM Reply Quote 0
                    • F
                      Finger79 @jamesg246
                      last edited by Apr 5, 2024, 7:51 PM

                      @jamesg246 said in WPA2-Enterprise (EAP-TLS) User Authentication finally works on Windows 10 - how to use Computer Authentication and strip out "host/" in username?:

                      Did you ever sort this one? I'm having the same issue

                      Nah, I put it on hold. Only User Authentication works so far in Windows 10, so WiFi only connects after I log in. It makes attempts to connect to WiFi before login via the Computer Authentication (since I have both checked), but it still prepends "host/" before the certificate Username and the FreeRADIUS implementation in pfSense rejects it.

                      J 1 Reply Last reply Apr 5, 2024, 8:41 PM Reply Quote 0
                      • J
                        jamesg246 @Finger79
                        last edited by Apr 5, 2024, 8:41 PM

                        @Finger79 I have this working with Computer authentication, but only with the Check Client Certificate CN option disabled in EAP settings. If I enable this, it stops working.

                        As you've said the authentication requests come as "host/CN" - I've added "host/CN" to the users table and this allows the device to pickup the vlan setting etc. At the moment I'm using the revoke lists to get around having Check Client Certificate CN disabled.

                        It looks like the following needs to be added to the hints file and using the pre-process module
                        DEFAULT Prefix == "/host", Strip-User-Name = Yes
                        DEFAULT Suffix == ".server.domain.com", Strip-User-Name = Yes

                        In my case I don't need to add the suffix but I've no idea where to start with adding those attributes to the pfsense freeradius server.

                        F 1 Reply Last reply Apr 5, 2024, 8:48 PM Reply Quote 0
                        • F
                          Finger79 @jamesg246
                          last edited by Finger79 Apr 5, 2024, 8:49 PM Apr 5, 2024, 8:48 PM

                          @jamesg246 said in WPA2-Enterprise (EAP-TLS) User Authentication finally works on Windows 10 - how to use Computer Authentication and strip out "host/" in username?:

                          @Finger79 I have this working with Computer authentication, but only with the Check Client Certificate CN option disabled in EAP settings. If I enable this, it stops working.

                          That's interesting. The "Check Client Certificate CN" option in EAP settings doesn't seem to do anything to me. Thread here with the Redmine bug report linked: Longstanding FreeRADIUS EAP-TLS security bug on validating client certificate common name

                          In other words, even with "Check Client CN" enabled, I can completely delete the FreeRADIUS Users table and clients can still connect. Strange behavior.

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post
                          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
                            This community forum collects and processes your personal information.
                            consent.not_received