Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using CoovaChilli without internet access #212

Closed
denizerdi opened this issue Feb 10, 2016 · 9 comments
Closed

Using CoovaChilli without internet access #212

denizerdi opened this issue Feb 10, 2016 · 9 comments

Comments

@denizerdi
Copy link

Hello

I am trying to make an offline media server with raspberry Pi. And i want to redirect people to the main page (IP of the device) when they connect to it through wifi hotspot. I managed to install coova and it works when Pi is connect to internet through eth0. But when i unplug the eth cable it doesnt work. I think i need to install a dns server inside Pi and make coova use it. But i cant seem to do this. Can anyone help me please?

Thanks

@gbaligh
Copy link
Contributor

gbaligh commented Feb 10, 2016

Can you try to force coovachilli to resolve only for local domain ?

"uamaliasip" - "Special IP Address aliased (redirect) to uamlisten/uamport" 
"uamaliasname" - "Special simple hostname (no dots) to be resolved to uamaliasip"
"uamhostname"  - "Special simple hostname (no dots) to be resolved to uamlisten"
"domaindnslocal" - "Option to consider all hostnames in domain as local"

@denizerdi
Copy link
Author

HS_UAMALIASNAME=

will i add like this to the config file in chilli?

@denizerdi
Copy link
Author

My whole purpose is actually just triggering something that is gonna redirect people when they connect to wifi or type another adress. ATM I don't need an authorization system.

@gbaligh
Copy link
Contributor

gbaligh commented Feb 10, 2016

The client must issue a HTTP request to be redirected, and it can only send HTTP if the DNS server respond.
So, What I'm suggesting is to try to resolve all FQDN suffixed by the localdomain to the uamlisten address.
Client will try to resolve FQDN directly, if this fail it will try to resolve FQDN.localdomain.
Just an idea.

@denizerdi
Copy link
Author

Thanks for your answers. I am still trying and i discovered something. I unplugged ADSL cable from my router but Pi is still connected to it via eth0. So no internet access (in coova config dns are google dns). When i connect to wi-fi coova works great. Whatever i type i am still redirected to coova login page. So i am guessing my router somehow is acting like a DNS server?

@muratbeser
Copy link

Deniz use iptables for redirecting users for 80
If you want just a media server and dont want to serve any wifi hotspot service I think it's a good solution.

@sevan
Copy link
Member

sevan commented May 25, 2016

Hi,
There is now a mailing list for questions such as these, the issues section will be used solely for bug reports in code from now on, can I ask you to subscribe & take the discussion there (give it a few days as the system is freshly setup without any subscribers at the moment).

@sevan sevan closed this as completed May 25, 2016
@antoniovalenzuela
Copy link

antoniovalenzuela commented Apr 27, 2018

add 2 zones into local DNS (bind server too resolves on UAMLISTEN IP, Port UDP 53)

Example:
HS_UAMLISTEN=10.10.10.1
HS_DNS1=10.10.10.1

Windows 10 and above use http://www.msftconnecttest.com/connecttest.txt
Windows 8.1 and earlier versions use http://www.msftncsi.com/ncsi.txt

zone: msftncsi.com
www IN A 190.46.255.40 (or any public IP)

zone: msftconnecttest.com
www IN A 13.107.4.52 (or any public IP)


Another and best option, uses RPZ (Response Policy Zones)

in local zone:
response-policy { zone "rpz"; } qname-wait-recurse no;
zone "rpz" {
type master;
file "/etc/bind/db.rpz";
};

file db.rpz:
www.msftconnecttest.com IN A 13.107.4.52
www.msftncsi.com IN A 190.46.255.40

190.46.255.40 and 13.107.4.52 are the real IP addresses of each URL. It does not matter that you do not have internet, since coovachilli before login always responds to TCP ports 80 for any IP (not dropped on a Firewall or IPTABLES)

In this way the DNS resolves the hosts and the browser redirects the page.

Windows 10 it works perfect.

For Android devices:
connectivitycheck.gstatic.com IN A 216.58.222.163
connectivitycheck.android.com IN A 216.58.222.174
clients1.google.com IN A 216.58.222.174
clients3.google.com IN A 216.58.222.174

I have scrips that check the status of the internet, so when there is no connection it redirects to an "internet temporarily out of service" page. The captive portal also has several interventions according to the needs of my clients.

@s13884
Copy link

s13884 commented Apr 12, 2019

@denizerdi Can you help me to configure it without internet? Also does it still sending the login page of coova when no ethernet attached to pi?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants