Creating a Hotspot Gateway with RouterOS
- Configuring the Hotspot Server
- Enabling SSL Encryption
- Change Login and Hotspot Pages
- Getting More Help
In earlier tutorials, you discovered RouterOS, an open source operating system that can make your generic PC into an advanced, enterprise-type, router and LAN server.
In the article "Turn an Old PC into a LAN Server with RouterOS: Part 1," you put together the computer, installed the Linux-based software, and did some initial configuration.
In "Turn an Old PC into a LAN Server with RouterOS: Part 2," you set up the DHCP server to handle the IP addresses, enabled NAT to share the Internet, and configured the wireless interface for Wi-Fi access.
Now you will experiment with the hotspot features. If you want to offer wireless Internet to the public, this tutorial will get you started.
Configuring the Hotspot Server
First, make sure that you configured the Internet connection on its interface and created an IP on another interface for the LAN/hotspot. (We discussed this in Part 1 of this tutorial series.)
Now you can configure a hotspot server on the LAN/hotspot interface with the WinBox utility. Follow these steps:
- Click IP > Hotspot.
- Click the Hotspot Setup button to open the wizard.
- Select the interface that the switch or AP for the hotspot network will be connected to and then click Next.
- Verify the IP of the server, which should be the address you had created for the LAN/hotspot interface, and click Next.
- Verify the IP range that's automatically chosen for the hotspot users and click Next.
- Ignore the server certificate setting, at least for now, and click Next.
- Unless you are running your own SMTP email server or are using a service, ignore the setting and click Next.
- Verify that the DNS server address from your Internet connection is entered and click Next.
- If you prefer that your users see a DNS (domain) name instead of the gateway's IP when logging in, you can create one here and click Next.
- Finally, create a hotspot user so you can log in; then click Next.
It's best to secure your hotspot login pages with SSL encryption when users are logging in with unique accounts; otherwise, the account credentials could be easily sniffed by eavesdroppers on the network. When accepting payments, encryption is a must!
You'll see how to get this all set up a bit later.
To prevent people from sending junk or illegal email from your Internet connection, you should block the port used for outgoing email (25), which I'll discuss later.
However, so users aren't forced to use only web-based mail applications, you can list your own SMTP server that better controls usage, preventing them from sending tons of email.
You can essentially just make up a domain name, such as hotspot.yourcompanyname.com. If nothing is entered, your IP address will automatically be used.
After completing the Hotspot Setup Wizard, you should get a disconnect prompt from WinBox. That means the hotspot captive portal is working. To receive network and Internet access, you must log in with the account you created via the Web browser.