www.zeroshell.org Forum Index www.zeroshell.org
Linux Distribution for server and embedded devices
 
 SearchSearch  RegisterRegister  UsergroupsUsergroups 
 ProfileProfile  Log inLog in  Log in to check your private messagesPrivate Message 

How to set up a wireless router with captive portal

 
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell
View previous topic :: View next topic  
Author Message
Thanatos



Joined: 29 Oct 2017
Posts: 1

PostPosted: Mon Oct 30, 2017 12:19 am    Post subject: How to set up a wireless router with captive portal Reply with quote

I have a PC with a wireless card and wired Ethernet. I want to set this machine up as a router ON my existing home network. This should enable me to manage my kids' connections to the internet (dansguardian, DNS restrictions, etc.).
I did have this machine working as an access point, allowing my existing router's DHCP to give them IPs but seemed to also make the Zeroshell machine passive in the traffic that passed through it.
I have made a new profile and attempted to set up the machine as a router and have had no luck. I am able to get assigned an IP address via wifi but not captive portal.
I tried to follow http://www.zeroshell.org/hotspot-router/ but got lost at setting the interface to MULTI. As soon as I set MULTI the web interface frames were randomly showing "Your connection is not private." As soon as I changed multi to WLAN00 those messages went away again (bug?). (Despite this I tried the connection and still had no luck).
I am able to connect to the Zeroshell machine on my home network but, the Zeroshell machine is not connecting to the internet through the router.
I thought I should have to go to Network->Router and set up the routing table (instead of MULTI??) but I can't figure out how to set up the table.

At this point I am just really confused:
Is default gateway my router's, or the Zeroshell router I am creating?
When I try to add a gateway or interface no matter what IP I enter I get it "...is not a valid destination"
The routing table appears to just be a list of interfaces but I don't see how they are connected (and assume the order matters? Top to bottom? Bottom to top?).
If I bridge the two interfaces will dansguardian and DNS even work?

Is there another source to explain how to set up Zeroshell as a simple wifi router (using captive portal or some other method to control who's using the network)?

TL;DR: Can't figure out how to set up a simple wireless router using captive portal on a PC with a wireless and a wired interface connected to a router connected to the internet... Please help.

Thank you!
Back to top
View user's profile Send private message
Montikore



Joined: 19 Jan 2016
Posts: 64

PostPosted: Mon Oct 30, 2017 1:14 pm    Post subject: Reply with quote

Hi,

Even if i don't know Captive portal, i think your configuration is not right...

Basically, if you want to use Zeroshell as your main router, all of your computers must have the zeroshell IP as default gateway, and zeroshell must have your internet box IP as default gateway. Do not use the DHCP from your internet box, this box has to be invisible for all the computers. (if not, all the trafic may go directly to the internet box without passing through zeroshell)
Usually, with a basic configuration like this, you don't need to care about the routing table.
Back to top
View user's profile Send private message
DiliaK



Joined: 26 Aug 2015
Posts: 11

PostPosted: Mon Oct 30, 2017 6:20 pm    Post subject: Reply with quote

Here is a AP configuration :

On console :
Configure a ssid on wlan00 with encryption (private use)
Configure a ssid on wlan01 with plain text for captive portal.

On Zeroshell web gui :
eth0 and wlan0 (private wifi) on a bridge on same network than your wired network.

Bridge0 on 192.168.0.243 so i connect zeroshell here.

NAT on bridge0

Wlan0 will have IP from box DHCP on private network.

Wlan1 on 192.168.1.243 (public wifi on captive portal)

Zeroshell dhcp deliver on 192.168.1.0 on .0.1 to .0.150 for example
Default gateway on 192.168.0.243
DNS where you want


captive portal configured on wlan1

Firewall rule to blocl .1.0 to go on 0.0 :
1 WLAN01 * DROP all opt -- in WLAN01 out * 192.168.1.0/24 -> 0.0.0.0/0 destination IP range 192.168.0.1-192.168.0.253
Just drop all packet to go between 192.168.0.1 to 192.168.0.253 (192.168.0.254 is my gateway internet box)

Enjoy !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    www.zeroshell.org Forum Index -> ZeroShell All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group