Recommended Posts

Hello,

 

I'm a student and have to configure a captive portal for my project using pfsense.

 

My project is to configure a '' WAN network '' but on a private lab. For that, I need to configure a UNREAL Tournament game server on a DMZ, and the clients are separated from it by another router and can access it in order to play it.

 

 

It's simpler with a picture so the network I have is the following : 

 

 

  post-519605-0-33871900-1399981945.png

 

 

 

 

So, what I want to do, is telling the clients that as long as they are not authenticated by the captive portal, they can't access to the network and therefore they can't access the game.

 

The problems are : I dont have a dedicated machine to run pfsense so I have to run it on VMs, and my all network doesnt have internet access.

 

I've managed to do this so far : 

 

post-519605-0-12312300-1399982431.png

 

 

NIC1 is my WAN interface and NIC2 is my LAN interface.

 

I can access the webConfigurator.

But from the LAN I can't ping the WAN interface.

 

THe LAN interface is setup as 192.168.1.1, DHCP Disable because I have my own DHCP server on the ROUTER 1

 

The WAN interface is setup statically as 192.168.10.2 and upstream gateway is 192.168.10.1.

 

I'm pretty sure the problem is from this WAN interface setup but I don't know how to fix it really so some help would be nice.

 

Thank you

 

 

 

 

 

 

 

 

 

 

 

 

 

"and my all network doesnt have internet access."

 

What does this mean - you clearly have internet.. Since you posted this?

 

What does the internet have to do with anything if "your" running the game server?  This could be all done on vm..  So both routers are pfsense?  Everything even the clients could be vms

 

You show 2 routers, and your pfsense vm?  So there are 3 routers?  So this router1 and router2 and the game server all reside in physical?

 

And the host your on is on this 192.168.10.0/24 network?  And your clients that need to get to the game server are going to be physical or vms?

This means, my host machine has internet access but I can't allow VMs to have the access because this is an university network with so much restrictions.

 

No both routers are ciscos, the only reason I'm using pfsense is to do the captive portal.

 

Kinda hard to explain but I hope it's understandable.

 

 

And yeah everything is physical except the clients who plays the game from Virtual Machines and the pfsense 

Is your host connected to this switch that is the 192.168.10.0/24 network?  From the drawing its not.

 

You have a line from the 192.168.10.0/24 switch to pfsense -- but to what?

 

You say your lan can not ping what wan?  Pfsense 192.168.10.2?  Can pfsense ping 192.168.10.1?

The host machine is not connected to the 192.168.10.0/24 network because I can't touch any ethernet interfaces -.-

 

I forgot on the drawing that the VMs are connected to the switch, all of them.

 

Also I need to know, with my setup , the VM clients should have an IP address like 192.168.10.x with 192.168.10.1 gateway or 192.168.1.x with 192.168.1.1 gateway ?

 

Sorry i'm new to this and really confused.

 

When my VM client has the address 192.168.10.x I can ping the WAN interface but not the lan and vice-versa.

 

Pfsense can't ping 192.168.10.1

"The host machine is not connected to the 192.168.10.0/24 network because I can't touch any ethernet interfaces -.-"

 

Then how and the F is pfsense suppose to be able to talk with 192.168.10.1 ??  So that it can then talk to the game server??  Magic??

 

So you have no wire that runs from this switch to the host box that pfsense is running vm on?  Then how do you show a wire from that switch to pfsense??

 

The host that is running your VM software, that pfsense is a vm on has to have a physical connection to that switch 192.168.10.0/24 or it is not possible for pfsense to be connected to that network - yet you show a line..  Your pc does not have to have an IP in that network.. But it needs a physical connection so that your vm can connect.

 

what are the current connections on your host machine?

Here like this

 

post-14624-0-33109000-1399987608.png

 

BTW that 172.108 is a public IP space.. rfc1918 space that starts with 172.16-31.x.x

 

BTW why are you doing nat on the other routers?  Are you not just pretending those are internet services - the nat is of no point when everything is rfc1918 space..  Is that really 172.108 public IP space?

Ok that was pretty stupid from me. I did the config with my personal laptop, which means I don't have internet access though :

 

WAN Interface : Bridged : Configured by DHCP ( because the ROUTER 1 does DHCP server ) : address 192.168.10.7 , gatewway : 192.168.10.1.

                                                                                                                       

LAN Interface : Internal network intnet : 192.168.1.1. 

 

so pfsense can now ping 192.168.10.1. 

 

Although, from my client VM which is setup as 192.168.10.8 with 192.168.10.1 gateway. The VM is on my personal laptop and is in Internal network intnet.

 

When i try to ping the WAN interface of pfsense ( which is now 192.168.10.7 ) it says " Destination host unreachable. "

 

So now, is this a route problem or something else ? I'm so lost with VMs

 

( I also tried with VM setup as 192.168.1.8 and gateway 192.168.1.1 , because it makes more sense, and it says Request timed out )

 

 

EDIT : Didnt see your last post, 172.108 is a public space but the lab where i'm working is like isolated from the rest so i can put any IP addresses I want, this part will actually be a DMZ later on

"172.108 is a public space but the lab where i'm working is like isolated from the rest"

Still VERY VERY BAD!!! Practice to use external public IP space that is not owned by you on your network. There is plenty of rfc1918 space - there is no reason to use public IP space that is not owned you on your own network. And even if owned by you, using it what is clearly a private network makes for confusion.

Now I currently don't show any whois for 172.108, the 172.16/12 is rfc1918, but for example 172.0/12

NetRange: 172.0.0.0 - 172.15.255.255

CIDR: 172.0.0.0/12

OrgName: AT&T Internet Services

You should not be using this address space - it is a VERY BAD habit to get into pulling address space out of thin air and using it.

Ok if the router for 192.168.10.0/24 is handing out dhcp - you can not just use static.. That could cause all kinds of problems (how do you know there is not another device using that IP?). In your vm software if you bridge physical interface that is connect to this 192.168.10.0/24 network, your physical machine should get an IP. And then the virtual machines with interfaces on this network should also get an IP from the dhcp server on this network. Since the VM virtual nic bridged to your physical would have its own mac.

Now you mention this is school and you can not connect vms to the internet? Who owns this router for the 192.168.10.0/24 network and this switch. If it is running any sort of nac or nap, port security - its possible that only the mac it first sees on a port is allowed an IP, etc. Or registered macs can get an IP, etc.

In a nutshell. On your pfsense vm, on its wan interface that is bridged to your physical interface connected to the 192.168.10.0/24 network - you should be able to set it to dhcp and get a IP. If it doesn't then your never going to get this to work. And you need to contact who admins that router, etc. If pfsense can not talk to its wan gateway - then no vms you put behind it would be able to talk out the wan, etc.

If your physical host can ping to the 192.168.10.1 router - then your pfsense wan via dhcp should also be able to ping this 192.168.10.1 address.

Hm actually I had to find a free captive portal solution , considering most of the computers in the lab are using windows I thought of Firstpot but it was not free and then I found pfsense which seemed pretty simple to use. Then my supervisors agreed with that solution even if they didn't know pfsense can be used as a captive portal lol

  • 3 weeks later...

Well, the project is not finished yet and I have another problem and I don't know how to fix it again -_-

 

So, once I did the captive portal and radius everything works fine if I have internet, but considering in my test lab I don't have internet, I can't use the ISP DNS so the redirection to the captive portal does not work.

 

That's why I installed the bind service. I configured it like this http://ejnetwork.wordpress.com/2014/01/17/blocking-domains-with-pfsense-using-bind/.

 

I am really new to DNS configurations and I still don't know if it is possible to redirect every http or https request to the captive portal. For now if a user enter an IP address in the URL I am able to redirect it but if he types in any domain name like "rjwiepjpweihgpwerihgew" for exemple it doesn't work.

 

So I think it's coming from the DNS server that I configured badly but I don't really know.

 

Sorry again and thank you in advance 

And why can you not just use the built in dns of pfsense, you can create host over rides for anything you want..  This would be the common setup for using pfsense..  Yes you would have pfsense forward to something for public dns like your isp or googledns, opendns, etc..

 

But for testing you can create whatever host records you need.. For example if you want www.google.com to resovle to 1.2.3.4 its a simple over ride.  While I love Bind, and it is the golden standard for dns - its not something you start using without some decent understanding of the underlaying principles of dns, etc..

 

I really would suggest you use pfsense built in dns..

 

C:\Users\BudMan>ping www.google.com

Pinging www.google.com [1.2.3.4] with 32 bytes of data:
Control-C
^C

 

post-14624-0-81083600-1401803320.png

 

I use bind because I have basic linux knowledges and the point of my project is to know more about this, my supervisors just said " use bind " so I did lol

 

THe only point of that is actually this :

 

A client will access our game server, but he can't access it as long as he doesn't authenticate himself on the captive portal.

 

So i saw that on BIND I can modify the file /etc/hosts and tell him like this : " 172.108.10.2 gameserver "

 

So then, if i try to connect onto 172.108.10.2, does the captive portal webpage is supposed to pop ?.

you would not be editing any /etc/hosts file in bind.. Where did you see that?

/etc/hosts is a local file for name resolution - has nothing to do with bind at all.

BIND is a recursive or authoritative name server.. Or both.. If all you want is a host to resolve something.domain.tld to some IP then sure you could edit on linux the /etc/hosts file - or on windows you could do the same thing under C:\Windows\System32\drivers\etc there is hosts file you could edit.

Not sure what you think that has to do with a captive portal.. Captive portal can require you to auth yes, but it redirects where ever your going to the "portal" part.. Does not matter if your going to www.google.com, www.neowin.com or whatever.. The captive portal redirects wherever your trying to go to the portal.. Then once you auth, then it lets you go to where you were starting to go. Or some other landing page, etc.

Where do you want your client to go, your game server? What is the fqdn of this name server, and what are you using for local dns so that it resolves? I would assume your systems are using pfsense for dns.. Since this is how it works out of the box and is the common 99.9% of the time setup.

If you are pointing your client to something else for dns, then sure any FQDN you want to go to be it on the internet or you local network should resolve. If your not using local dns, and you need your client to resolve something for a local type fqdn, something.foo.tld then sure you could use a host file.

Oh ok i definitely didn't understand a damn thing ahah thank you.

;

Yes my client needs to go on my game server. His fqdn is GameServer-HP. I wanted to use the pfsense bind package as a local DNS to resolve it.

 

But if i understood everything correctly, which I am really not sure, if the clients wants to connect to the gameserver he will be redirected to the captive portal webpage if I set up the host file ? I don't even need a local DNS ??

 

I'm really sorry for all these questions and I'm really grateful for all the help budman thank you !

Why would you need bind on pfsense, unless you were going to do something really fancy like zone xfer, etc.. Bind is way over the top for resolving a fqdn to an IP. The builtin dnsmasq can do this with a simple host override.

gameserver-hp is not a fqdn btw. gameserver-hp.something.tld would be a fully qualified domain name.

To be redirected your host doesn't have to resolve anything, you could go http://ipaddress and it should be redirected to the captive portal. If you want to go http://gameserver-hp that resolves to ipaddress on your box that is fine. But it has little to do with the redirection mech of a captive portal.

does not matter where you try to go, the captive portal redirects you to its landing page. Once you auth, put in payment, use a voucher, etc. And the captive portal accepts it then it will send you on to where you really were wanting to go. Does not matter if you can really get there or not. The captive portal does not need to even be able to resolve this.

BTW your trying to hit a http or https site right, running some game software that connects to some gameserver port in some game software is not going to get redirected. The captive portal is going to only redirect http or https requests.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • I think he means you haven't reviewed previous UFC games. Of course it doesn't matter... Every time you just report on something that involves the President even if just simply what happened you guys usually get accused of being anti-Trump. We live in fun times.
    • So how did you solve the problem? Disabling Secure Boot isn’t a solution.
    • Another devilish issue surrounding these certificates is what can happen with old, unsuspecting PCs that nevertheless have Secure Boot enabled. In my case, it was a Dell with a 3rd-gen Core chip (so about 13 years old). As of the last few weeks, it was suddenly BSOD'g within about 5 minutes of booting. Turns out it was because of MS's "Secure-Boot-Update" scheduled task, which is scheduled to run 5 minutes after login. It's explained in gory detail here (this is not my post, but it was where I found the answer), but the short version is that this legacy system would need fairly elaborate, manual certificate intervention since MS's automatic cert update method cannot work. How to do that is linked late in the thread. https://www.bleepingcomputer.c...od-caused-by-scheduled-task Secure Boot wasn't at all important for this particular PC, so I disabled it to be done with the problem.
    • Winhance 26.06.12 by Razvan Serea Winhance is an open-source Windows enhancement utility designed to help users debloat, optimize, and customize Windows 10 and 11. It provides a user-friendly interface for removing unwanted apps, legacy components, and optional features safely, giving you more control over your system. With Winhance, you can improve performance, reduce clutter, and enhance privacy without the need for a clean install. Beyond basic debloating, Winhance offers extensive optimization tools. Users can tweak power plans, adjust gaming and performance settings, control notifications, and manage Windows Update behavior. Privacy-focused settings allow you to limit telemetry and data collection, while system customization options let you personalize the taskbar, Start menu, Explorer, and Windows themes. Winhance also supports installing or removing software efficiently, including external apps via WinGet integration, streamlining both new setups and daily maintenance. New AI privacy groups have been added for Windows AI, Microsoft Edge AI, and Microsoft Office AI, giving users clearer control over AI-related telemetry and feature usage. In addition, new settings in Gaming & Performance introduce AI taskbar pin toggles, options to remove AI apps, and controls for AI services and scheduled tasks, allowing users to better manage how AI components run in the background and appear in the system. For advanced users and IT professionals, Winhance integrates WIMUtil, a tool for creating custom Windows installation ISOs with automated configuration. You can generate autounattend.xml files, inject drivers, and apply your chosen Winhance settings automatically during installation. Most changes are non-destructive and reversible, with clear explanations in the GUI. Whether you’re optimizing a single PC or managing multiple systems, Winhance delivers a faster, cleaner, and highly personalized Windows experience. The Winhance.Installer.exe includes both Installable and Portable versions during setup. Winhance supports both Windows 10 and Windows 11 64-bit versions. It's regularly updated to ensure compatibility with the latest Windows updates and features. Winhance key features: Debloat Windows – Safely remove unwanted apps, features, and legacy components. Optimize Performance – Tune system settings for speed, responsiveness, and gaming. Privacy Enhancements – Control telemetry, data collection, and notifications. Power Management – Configure power plans and advanced energy settings. Windows Update Control – Adjust update behavior for stability and convenience. Theme Customization – Switch between light/dark mode and adjust system colors. Taskbar & Start Menu Tweaks – Modify layout, icons, and behavior. Explorer Customization – Adjust file explorer appearance and functionality. Software Management – Install/remove Windows apps and optional features. External Apps Installation – Deploy essential apps via WinGet integration. Configuration Management – Save, export, and import Winhance settings easily. Automation with WIMUtil – Create custom Windows ISOs with integrated settings. Autounattend.xml Generator – Automate Windows installations with preconfigured options. Driver Integration – Include current system drivers in custom ISOs. Non-Destructive Changes – Reversible settings with clear explanations in the GUI. Winhance 26.06.12 changelog: Features Builder Mode — build a Winhance config file or autounattend.xml without changing anything on the PC you're sitting at. Flip the new mode switcher to Builder, set everything the way you want it, and save the result as a Winhance config or an autounattend file ready for deployment on other machines. Sponsors & Supporters page — the exit donation dialog is gone. In its place, an in-app page (heart icon or the More menu) recognizes the businesses and individual supporters who keep Winhance free. It works offline and is fully localized. Change History — Winhance now keeps a receipt of everything it does. ChangeHistory.txt records every setting change (before and after values) and every app install or removal, with clear headers for config imports and bulk actions. Open it from the More menu. Hebrew language support — Winhance is now available in 29 languages. New Explorer customizations: desktop icon visibility toggles, This PC folder visibility, an icon cache size setting, and automatic thumbnail cache cleanup. New "All apps view" setting for the redesigned Windows 11 Start menu, and the Windows 11 system tray icons setting is now a dropdown with more control. App-local UI zoom — press Ctrl +/-/0 or use Ctrl+MouseWheel to scale the whole app, just like a browser. New External Apps: EA app, Ubisoft Connect, Battle.net, Rockstar Games Launcher, PowerShell, and Helium Browser. Bug Fixes Layouts no longer clip when the Windows text size slider is set above 100%. Accessibility: Narrator now announces setting names on toggles and dropdowns, previously unlabeled buttons are labeled, and progress updates are announced. Silent updates now respect your custom install location instead of reverting to the default. Cancel in Review Mode no longer clears your app selections. OneNote is now detected correctly for Win32 Click-to-Run installs. Clean Start Menu applies more reliably by also writing the group policy path. WinGet errors are no longer silent — error details now show in the terminal output. Fixed a startup crash on older Windows builds caused by a .NET runtime regression. Config import now converts power setting values correctly and no longer re-applies an already-active power plan. Improvements App icons load noticeably faster and cover almost everything now, including legacy capabilities and optional features — they come from a dedicated, checksum-validated icon repository and are fetched in parallel. Software & Apps polish: per-icon tooltips, extra table columns, an app sort dropdown, relocated search, and a cleaner compact view. A warning now appears when the Connected Devices Platform Service is set to Manual or Disabled, since some Windows features depend on it. Download: Winhance 26.06.12 | 61.5 MB (Open Source) Links: Winhance Website | Github | Screenshot Get alerted to all of our Software updates on Twitter at @NeowinSoftware
    • Microsoft Windows 11 Pro and Office Home & Business 2024 is still 69% off by Steven Parker Today's highlighted deal comes via our Apps + Software section of the Neowin Deals store, where you can save 69% on Windows 11 Pro + Microsoft Office Home & Business 2024. Upgrade your computing experience with Windows 11 Pro. This cutting-edge operating system boasts a sleek new design and advanced tools to help you work faster and smarter. From creative projects to gaming and beyond, Windows 11 delivers the power and flexibility you need to achieve your goals. With a focus on productivity, the new features are easy to learn and use, enhancing your workflow and efficiency. Whether you're a student, professional, gamer, or creative, Windows 11 Home has everything you need to take your productivity to the next level. New interface. easier on the eyes & easier to use Biometrics login*.Encrypted authentication & advanced antivirus defenses DirectX 12 Ultimate. Play the latest games with graphics that rival reality. DirectX 12 Ultimate comes ready to maximize your hardware* Screen space. Snap layouts, desktops & seamless redocking Widgets. Stay up-to-date with the content you love & the new you care about Microsoft Teams. Stay in touch with friends and family with Microsoft Teams, which can be seamlessly integrated into your taskbar** Wake & lock. Automatically wake up when you approach and lock when you leave Smart App Control. Provides a layer of security by only permitting apps with good reputations to be installed Windows Studio Effects. Designed with Background Blur, Eye Contact, Voice Focus, & Automatic Framing Touchscreen. For a true mouse-less or keyboard-less experience TPM 2.0. Helps prevent unwanted tampering Windows 11 Pro also includes a number of productivity-focused features, such as the ability to snap multiple windows together and create custom layouts, improved voice typing, and a new, more powerful search experience. Personal and professional users will enjoy a modern and secure computing experience, with improved performance and productivity features to help users get more done. Only on Windows 11 Pro If you require enterprise-oriented features for your daily professional tasks, then Windows 11 Pro is a better option. Set up with a local account (only when set up for work or school) Join Active Directory/Azure AD Hyper-V Windows Sandbox Microsoft Remote Desktop BitLocker device encryption Windows Information Protection Mobile device management (MDM) Group Policy Enterprise State Roaming with Azure Assigned Access Dynamic Provisioning Windows Update for Business Kiosk mode Maximum RAM: 2TB Maximum no. of CPUs: 2 Maximum no. of CPU cores: 128 Good to know: Length of access: lifetime Redemption deadline: redeem your code within 30 days of purchase Access options: desktop Max number of device(s): 1 Version: Windows 11 Pro Updates included Click here to verify Microsoft partnership Created with ChatGPT The essentials to get it all done. Microsoft Office 2024 Home is the latest version of Microsoft’s renowned productivity suite, which includes essential applications like Word, Excel, PowerPoint, and OneNote. This version is specifically designed for individuals and families seeking reliable tools for various home tasks, including document creation, spreadsheet management, presentation design, and note-taking. Office Home 2024 is for students and families who want classic Office apps on their Mac or PC. A one-time purchase installed on 1 PC or Mac for use at home or school. Lifetime license for MS Word, Excel, PowerPoint, & OneNote One-time purchase installed on 1 Windows PC for use at home or work Instant Delivery & Download – access your software license keys and download links instantly Free customer service – only the best support! Microsoft Office 2024 Home or Business for PC or Mac includes: Microsoft Office Word Microsoft Office Excel Microsoft Office PowerPoint Microsoft Office OneNote Is it legit? Click here to verify Microsoft partnership Good to Know ONE-TIME PURCHASE INSTALLED ON 1 DEVICE This licensing type will be connected with your Microsoft Account, NOT your actual device. This is a one-use code. The product you are purchasing is NOT MICROSOFT 365. Please read the product details. Redemption deadline: redeem your code within 30 days of purchase Access options: desktop Full versions No subscriptions – no monthly/annual fees Version: 2024 Updates included Here's the deal: This Microsoft Office Pro 2024 + Windows 11 Pro bundle normally costs $448.99, but this deal can be yours from just $134.97, that's a saving of $314. For full terms, specifications, and license info please click the link below. Microsoft Office Pro 2024 + Windows 11 Pro for just $134.97 (was $448.99) Although priced in U.S. dollars, this deal is available for digital purchase worldwide. Support queries If you have queries or need support for any of the Neowin Deals, please use the contact form here. Neowin Deals are managed and sold by StackCommerce who represent Neowin on an affiliate basis. Why we post these deals We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. So for those that keep moaning and complaining, be thankful we're still online for you to even do that. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
  • Recent Achievements

    • One Month Later
      Leroy Jethro Gibbs earned a badge
      One Month Later
    • Conversation Starter
      flexorcist earned a badge
      Conversation Starter
    • One Month Later
      AndreaB earned a badge
      One Month Later
    • One Month Later
      agatameier earned a badge
      One Month Later
    • Week One Done
      agatameier earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      518
    2. 2
      +Edouard
      198
    3. 3
      PsYcHoKiLLa
      147
    4. 4
      ATLien_0
      95
    5. 5
      Steven P.
      77
  • Tell a friend

    Love Neowin? Tell a friend!