Wifi Captive Portal
An implementation of a simple Captive Portal that allows access to an IP network via forwarding on the same machine running the GSM core network. A Wifi AP could be connected to the ethernet port specified in the hiera as wifi_if (default eth3) Any Wifi AP can be used, and configured as desired. In the future, maybe a RADIUS based solution could supercede this.
This commit is contained in:
parent
3563a411fc
commit
c749dd35f8
6 changed files with 170 additions and 1 deletions
|
@ -26,7 +26,7 @@ pgsql_db = '<%= @pgsql_db %>'
|
|||
pgsql_user = '<%= @pgsql_user %>'
|
||||
pgsql_pwd = '<%= @pgsql_pwd %>'
|
||||
pgsql_host = '<%= @pgsql_host %>'
|
||||
db_revision = 16
|
||||
db_revision = 18
|
||||
|
||||
# SITE
|
||||
site_name = "<%= @site_name %>"
|
||||
|
@ -42,6 +42,8 @@ mncc_ip_address = "<%= @mncc_ip_address %>"
|
|||
sip_central_ip_address = <%= @sip_central_ip_address %>
|
||||
webphone_prefix = <%= @webphone_prefix %>
|
||||
has_vsat = <%= @has_vsat %>
|
||||
has_wifi = <%= @has_wifi %>
|
||||
wifi_if = "<%= @wifi_if %>"
|
||||
|
||||
site_routing = [
|
||||
<%= @site_routing %>
|
||||
|
|
9
modules/rhizo_base/templates/dnsmasq.conf.erb
Normal file
9
modules/rhizo_base/templates/dnsmasq.conf.erb
Normal file
|
@ -0,0 +1,9 @@
|
|||
keep-in-foreground
|
||||
interface=<%= @wifi_if %>
|
||||
listen-address=<%= @wifi_ip %>
|
||||
port=54
|
||||
no-resolv
|
||||
dhcp-range=<%= @wifi_dhcp_range %>
|
||||
dhcp-option-force=114,http://<%= @wifi_ip %>
|
||||
dhcp-option-force=6,<%= @wifi_dns %>
|
||||
dhcp-leasefile=/var/lib/misc/dnsmasq-wifi.leases
|
22
modules/rhizo_base/templates/portal.conf.erb
Normal file
22
modules/rhizo_base/templates/portal.conf.erb
Normal file
|
@ -0,0 +1,22 @@
|
|||
<Directory /var/rhizomatica/portal>
|
||||
|
||||
RewriteEngine on
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^.*$ http://<%= @wifi_ip %>/index.php [R]
|
||||
Require all granted
|
||||
|
||||
</Directory>
|
||||
|
||||
<VirtualHost <%= @wifi_ip %>:81>
|
||||
#ServerName www.example.com
|
||||
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/rhizomatica/portal
|
||||
|
||||
#LogLevel info ssl:warn
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/portal_error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/portal_access.log combined
|
||||
|
||||
</VirtualHost>
|
Loading…
Add table
Add a link
Reference in a new issue