debian + freeradius icm chillispot + dd-wrt

Pagina: 1
Acties:

Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Hoi

Voor een van mijn projectjes (ja ik ben druk :P) wil ik een captive portal krijgen dat gebruikers laat authenticeren voor ze het web op mogen.

Het is belangrijk dat de eindgebruiker zelf users aan kan maken; daarom leek een radius (met db backend) oplossing mij handig, maar als iemand iets beters weet hoor ik het graag. Database omdat hier vast wel een nette webinterface voor is en die anders ook zelf wel gemaakt kan worden.
Aan de machine komen trouwens meerdere domme access points te hangen.

De volgende software heb ik gezien:

* pfSense: behandelt niet het dhcp deel en redirect niet automatisch naar het captive portal. Buiten dat: lastig userbeheer zonder meteen root xs te geven. Ook komt er samba op die machine en dat is voor mij vrij onhandig op de pfSense omgeving.
* Chillispot: project is al 5 jaar dood, lijkt me niet verstandig. Wel wat leuke forks zoals:
* coovachilli. Ziet er tof uit maar ik krijg de redirect na dhcp niet werkend.
* pepperspot: idem dito.

Beide zijn chillispot clones. Ik ga er wel vanuit dat zij ook de routering doen en evt met firewall scripts zorgen dat je op de captive portal uitkomt.

De config van coovachilli, ik heb er wat quatsch uitgeknipt...
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# -*- mode: shell-script; -*-
#   Local Network Configurations
# 

# HS_WANIF=eth0            # WAN Interface toward the Internet
HS_LANIF=eth1          # Subscriber Interface for client devices
HS_NETWORK=10.0.0.0    # HotSpot Network (must include HS_UAMLISTEN)
HS_NETMASK=255.255.255.0   # HotSpot Network Netmask
HS_UAMLISTEN=10.0.0.1      # HotSpot IP Address (on subscriber network)
HS_UAMPORT=3990            # HotSpot UAM Port (on subscriber network)
HS_UAMUIPORT=4990          # HotSpot UAM "UI" Port (on subscriber network, for embedded portal)

# HS_DYNIP=
# HS_DYNIP_MASK=255.255.255.0
# HS_STATIP=
# HS_STATIP_MASK=255.255.255.0
# HS_DNS_DOMAIN=

# OpenDNS Servers
HS_DNS1=194.109.9.99
HS_DNS2=194.109.6.66

###
#   HotSpot settings for simple Captive Portal
#
HS_NASID=nas01
HS_RADIUS=localhost
HS_RADIUS2=localhost
HS_UAMALLOW=www.ns.nl
HS_RADSECRET=testing123    # Set to be your RADIUS shared secret
HS_UAMSECRET=change-me     # Set to be your UAM secret
HS_UAMALIASNAME=chilli

#  Configure RADIUS proxy support (for 802.1x + captive portal support)
# HS_RADPROXY=on
# HS_RADPROXY_LISTEN=127.0.0.1
# HS_RADPROXY_CLIENT=127.0.0.1
# HS_RADPROXY_PORT=1645
# HS_RADPROXY_SECRET=$HS_RADSECRET
#  Example OpenWrt /etc/config/wireless entry for hostapd
#    option encryption wpa2
#    option server $HS_RADPROXY_LISTEN
#    option port $HS_RADPROXY_PORT
#    option key $HS_RADPROXY_SECRET


#   To alternatively use a HTTP URL for AAA instead of RADIUS:
HS_UAMAAAURL=http://10.0.0.1/hotspot

#   Put entire domains in the walled-garden with DNS inspection
# HS_UAMDOMAINS=".paypal.com,.paypalobjects.com"

#   Optional initial redirect and RADIUS settings
# HS_SSID=<ssid>       # To send to the captive portal
# HS_NASMAC=<mac address>  # To explicitly set Called-Station-Id
# HS_NASIP=<ip address>    # To explicitly set NAS-IP-Address

#   The server to be used in combination with HS_UAMFORMAT to 
#   create the final chilli 'uamserver' url configuration.
HS_UAMSERVER=$HS_UAMLISTEN

#   Use HS_UAMFORMAT to define the actual captive portal url.
#   Shell variable replacement takes place when evaluated, so here
#   HS_UAMSERVER is escaped and later replaced by the pre-defined 
#   HS_UAMSERVER to form the actual "--uamserver" option in chilli.
HS_UAMFORMAT=http://\$HS_UAMLISTEN:\$HS_UAMUIPORT/www/login.chi

#   Same principal goes for HS_UAMHOMEPAGE.
HS_UAMHOMEPAGE=http://\$HS_UAMLISTEN:\$HS_UAMPORT/www/coova.html

#   This option will be configured to be the WISPr LoginURL as well
#   as provide "uamService" to the ChilliController. The UAM Service is
#   described in: http://www.coova.org/CoovaChilli/UAMService
#
# HS_UAMSERVICE=


###
#   Features not activated per-default (default to off)
#
# HS_RADCONF=off       # Get some configurations from RADIUS or a URL ('on' and 'url' respectively)
#
# HS_ANYIP=on          # Allow any IP address on subscriber LAN
#
# HS_MACAUTH=on        # To turn on MAC Authentication
#
# HS_MACAUTHDENY=on    # Put client in 'drop' state on MAC Auth Access-Reject
#
# HS_MACAUTHMODE=local     # To allow MAC Authentication based on macallowed, not RADIUS
#
# HS_MACALLOW="..."      # List of MAC addresses to authenticate (comma seperated)
#
# HS_USELOCALUSERS=on      # To use the /etc/chilli/localusers file
#
# HS_OPENIDAUTH=on     # To inform the RADIUS server to allow OpenID Auth
#
# HS_WPAGUESTS=on      # To inform the RADIUS server to allow WPA Guests
#
# HS_DNSPARANOIA=on    # To drop DNS packets containing something other
#              # than A, CNAME, SOA, or MX records
#
# HS_OPENIDAUTH=on     # To inform the RADIUS server to allow OpenID Auth
#              # Will also configure the embedded login forms for OpenID
#
# HS_USE_MAP=on        # Short hand for allowing the required google
#              # sites to use Google maps (adds many google sites!)
#
###
#   Other feature settings and their defaults
#
# HS_DEFSESSIONTIMEOUT=0   # Default session-timeout if not defined by RADIUS (0 for unlimited)
#
# HS_DEFIDLETIMEOUT=0      # Default idle-timeout if not defined by RADIUS (0 for unlimited)
#
# HS_DEFBANDWIDTHMAXDOWN=0   # Default WISPr-Bandwidth-Max-Down if not defined by RADIUS (0 for unlimited)
#
# HS_DEFBANDWIDTHMAXUP=0       # Default WISPr-Bandwidth-Max-Up if not defined by RADIUS (0 for unlimited)

###
# Centralized configuration options examples
# 
# HS_RADCONF=url       # requires curl
# HS_RADCONF_URL=https://coova.org/app/ap/config

# HS_RADCONF=on        # gather the ChilliSpot-Config attributes in
#              # Administrative-User login
# HS_RADCONF_SERVER=rad01.coova.org      # RADIUS Server
# HS_RADCONF_SECRET=coova-anonymous      # RADIUS Shared Secret 
# HS_RADCONF_AUTHPORT=1812           # Auth port
# HS_RADCONF_USER=chillispot             # Username
# HS_RADCONF_PWD=chillispot          # Password



###
#   Standard configurations
#
HS_MODE=hotspot
HS_TYPE=chillispot
# HS_RADAUTH=1812
# HS_RADACCT=1813
# HS_ADMUSR=chillispot
# HS_ADMPWD=chillispot


###
#   Post-Auth proxy settings
#
# HS_POSTAUTH_PROXY=<host or ip>
# HS_POSTAUTH_PROXYPORT=<port>

#   Directory specifying where internal web pages can be served
#   by chilli with url /www/<file name>. Only extentions like .html
#   .jpg, .gif, .png, .js are allowed. See below for using .chi as a
#   CGI extension.
HS_WWWDIR=/etc/chilli/www

#   Using this option assumes 'haserl' is installed per-default
#   but, and CGI type program can ran from wwwsh to process requests
#   to chilli with url /www/filename.chi
HS_WWWBIN=/etc/chilli/wwwsh

#   Some configurations used in certain user interfaces
#
HS_PROVIDER=Coova
HS_PROVIDER_LINK=http://www.coova.org/



HS_LOC_NAME="My HotSpot"       # WISPr Location Name and used in portal


Het punt is hier met name dat ik zou verwachten dat ik geredirect word naar een captive portal page,wat dus niet gebeurt. Weet iemand nu al waar dit fout gaat?


offtopic:
morgen ga ik het nog eens met dd-wrt proberen en chillispot daarop, kijken of dat makkelijker wil...alhoewel ik het mooier vind om die login page op 1 plek te hebben ivm roaming enzo

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • Joseph
  • Registratie: April 2008
  • Laatst online: 09-05 23:14
www.ns.nl? Je bent voor de NS bezig om een hotspot voor de Trein of CS in te richten? Of zit hier een T-Mobile engineer in cognito?

Afijn, Coovachilli host zijn captive portal standaard op 3990 volgens mij. Ga eens op de WiFi verbinding naar dit adres:

http://10.0.0.1:3990/

(Ik ga er vanuit dat dat het IP van je AP is). Werkt dat überhaupt

PS: Is dit leuk of niet?

[ Voor 8% gewijzigd door Joseph op 08-01-2012 11:30 ]


Acties:
  • 0 Henk 'm!

  • CAPSLOCK2000
  • Registratie: Februari 2003
  • Laatst online: 17:44

CAPSLOCK2000

zie teletekst pagina 888

Je zegt dat de redirect niet werkt. Ik gok dat dit via iptables wordt geregeld. Heb je de firewall al geinspecteerd?

This post is warranted for the full amount you paid me for it.


Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Joseph schreef op zondag 08 januari 2012 @ 11:27:
www.ns.nl? Je bent voor de NS bezig om een hotspot voor de Trein of CS in te richten? Of zit hier een T-Mobile engineer in cognito?
Nope maar ik wil graag toegang geven tot bepaalde websites en omdat ik lui ben was ns de kortste die ik kon verzinnen :+. Ik heb niets te maken met een van voornoemde bedrijven.
Afijn, Coovachilli host zijn captive portal standaard op 3990 volgens mij. Ga eens op de WiFi verbinding naar dit adres:

http://10.0.0.1:3990/

(Ik ga er vanuit dat dat het IP van je AP is). Werkt dat überhaupt
Is het ip van de server :).
PS: Is dit leuk of niet?
Klopt, maar dd-wrt heeft ook wat features die ik ook weer niet wil missen :) (multi-ssid, AP isolation, vermogen en algehele tweakability).

Hmzz dat is grappig, als ik naar 10.0.0.1:3990 ga w ord ik geredirect naar 10.0.0.1:4990 en krijg ik netjes een webpage te zien. Wel "an error has occurred" icm het Coova logo, maar toch.

Punt is wel dat dat automagisch moet gebeuren (okay dat lijkt me firewall) en dat inloggen mogelijk moet zijn (:+) .


@CAPSLOCK: ik ga zo de FW eens bekijken.
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
root@portal:~#  iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             10.0.0.1            udp dpt:domain 
ACCEPT     udp  --  anywhere             255.255.255.255     udp dpts:bootps:bootpc 
ACCEPT     tcp  --  anywhere             10.0.0.1            tcp dpt:4990 
ACCEPT     tcp  --  anywhere             10.0.0.1            tcp dpt:3990 
DROP       all  --  anywhere             10.0.0.1            
DROP       all  --  anywhere             anywhere            

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
DROP       all  --  anywhere             anywhere            
TCPMSS     tcp  --  anywhere             anywhere            tcp flags:SYN,RST/SYN TCPMSS clamp to PMTU 
ACCEPT     all  --  anywhere             anywhere            
ACCEPT     all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            
DROP       all  --  anywhere             anywhere            

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Hmmz op zich duidelijk, maar lijkt me te weinig. DIt komt wel van coovachilli af; ik heb zelf niets ingesteld qua iptables. Eens even goed kijken naar die ifup scriptjes van ze.


Mijn RADIUS en UAM secrets zijn ondertussen wel aangepast, naar het secret voor localhost client respectievelijk 'random ding'.

En ook maar even een logging van een sessie (die mac is hetgene dat ik het dichtste bij heb staan maar zou imo niet uit moeten maken):

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
chilli.c: 3754: 0 (Debug) Waiting for client request...
Using intrapositioned negation (`--option ! this`) is deprecated in favor of extrapositioned (`! --option this`).
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=00:25:90:60:51:45 src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2408: 0 (Debug) Address not found: 10.0.0.2
chilli.c: 2822: 0 (Debug) New DHCP request from MAC=00-16-CB-02-0B-58
chilli.c: 2825: 0 (Debug) New DHCP connection established
dhcp.c: 2016: 0 (Debug) dhcp/bootps request being processed
chilli.c: 2700: 0 (Debug) DHCP request for IP address
ippool.c: 324: 0 (Debug) Requesting new static ip: 0.0.0.0
ippool.c: 324: 0 (Debug) Requesting new dynamic ip: 0.0.0.0
chilli.c: 2789: 0 (Debug) Client MAC=00-16-CB-02-0B-58 assigned IP 10.0.0.2
dhcp.c: 1419: 0 (Debug) !!! dhcp server :  !!!
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=00:25:90:60:51:45 src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2016: 0 (Debug) dhcp/bootps request being processed
dhcp.c: 1419: 0 (Debug) !!! dhcp server :  !!!
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2480: 0 (Debug) ARP: Did not ask for router address: 10.0.0.1
dhcp.c: 2481: 0 (Debug) ARP: Asked for target: 169.254.255.255
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2480: 0 (Debug) ARP: Did not ask for router address: 10.0.0.1
dhcp.c: 2481: 0 (Debug) ARP: Asked for target: 169.254.255.255
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2480: 0 (Debug) ARP: Did not ask for router address: 10.0.0.1
dhcp.c: 2481: 0 (Debug) ARP: Asked for target: 169.254.255.255
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=ff:ff:ff:ff:ff:ff src=00:16:cb:02:0b:58 prot=0806
dhcp.c: 2480: 0 (Debug) ARP: Did not ask for router address: 10.0.0.1
dhcp.c: 2481: 0 (Debug) ARP: Asked for target: 169.254.255.255
dhcp.c: 2520: 0 (Debug) arp_decaps: dst=00:25:90:60:51:45 src=00:16:cb:02:0b:58 prot=0806
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1192: 0 (Debug) http-request: GET / HTTP/1.1
redir.c: 1220: 0 (Debug) The path: 
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:3990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1426: 0 (Debug) -->> Setting userurl=[http://10.0.0.1:3990/]
redir.c: 2148: 0 (Debug) Process HTTP Request
redir.c: 2272: 0 (Debug) Processing received request
redir.c: 2504: 0 (Debug) redir_accept: Original request
redir.c: 2510: 0 (Debug) ---->>> resetting challenge: 962ad77c5e44a4ad912a49e14448eca4
redir.c: 2521: 0 (Debug) ---->>> challenge: 962ad77c5e44a4ad912a49e14448eca4
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1192: 0 (Debug) http-request: GET /www/coova.html?loginurl=http%3a%2f%2f10.0.0.1%3a4990%2fwww%2flogin.chi%3fres%3dnotyet%26uamip%3d10.0.0.1%26uamport%3d3990%26challenge%3d962ad77c5e44a4ad912a49e14448eca4%26mac%3d00-16-CB-02-0B-58%26ip%3d10.0.0.2%26called%3d00-25-90-60-51-45%26nasid%3dnas01%26userurl%3dhttp%253a%252f%252f10.0.0.1%253a3990%252f%26md%3dEDB39653D7AE84CE423DF60A3AE7921A HTTP/1.1
redir.c: 1220: 0 (Debug) The path: www/coova.html
redir.c: 1267: 0 (Debug) Query string: loginurl=http%3a%2f%2f10.0.0.1%3a4990%2fwww%2flogin.chi%3fres%3dnotyet%26uamip%3d10.0.0.1%26uamport%3d3990%26challenge%3d962ad77c5e44a4ad912a49e14448eca4%26mac%3d00-16-CB-02-0B-58%26ip%3d10.0.0.2%26called%3d00-25-90-60-51-45%26nasid%3dnas01%26userurl%3dhttp%253a%252f%252f10.0.0.1%253a3990%252f%26md%3dEDB39653D7AE84CE423DF60A3AE7921A
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:3990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1319: 0 (Debug) Cookie: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1412: 0 (Debug) Serving file coova.html
redir.c: 2148: 0 (Debug) Process HTTP Request
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1192: 0 (Debug) http-request: GET /www/coova.jpg HTTP/1.1
redir.c: 1220: 0 (Debug) The path: www/coova.jpg
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:3990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1319: 0 (Debug) Cookie: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1412: 0 (Debug) Serving file coova.jpg
redir.c: 2148: 0 (Debug) Process HTTP Request
redir.c: 1192: 0 (Debug) http-request: GET /www/wait.gif HTTP/1.1
redir.c: 1220: 0 (Debug) The path: www/wait.gif
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:3990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1319: 0 (Debug) Cookie: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1412: 0 (Debug) Serving file wait.gif
redir.c: 2148: 0 (Debug) Process HTTP Request
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1192: 0 (Debug) http-request: GET /www/login.chi?res=notyet&uamip=10.0.0.1&uamport=3990&challenge=962ad77c5e44a4ad912a49e14448eca4&mac=00-16-CB-02-0B-58&ip=10.0.0.2&called=00-25-90-60-51-45&nasid=nas01&userurl=http%3a%2f%2f10.0.0.1%3a3990%2f&md=EDB39653D7AE84CE423DF60A3AE7921A HTTP/1.1
redir.c: 1220: 0 (Debug) The path: www/login.chi
redir.c: 1267: 0 (Debug) Query string: res=notyet&uamip=10.0.0.1&uamport=3990&challenge=962ad77c5e44a4ad912a49e14448eca4&mac=00-16-CB-02-0B-58&ip=10.0.0.2&called=00-25-90-60-51-45&nasid=nas01&userurl=http%3a%2f%2f10.0.0.1%3a3990%2f&md=EDB39653D7AE84CE423DF60A3AE7921A
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:4990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1319: 0 (Debug) Cookie: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1412: 0 (Debug) Serving file login.chi
redir.c: 2148: 0 (Debug) Process HTTP Request
redir.c: 2206: 0 (Debug) Running: /etc/chilli/wwwsh /etc/chilli/www/login.chi
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1192: 0 (Debug) http-request: POST /www/error.chi HTTP/1.1
redir.c: 1220: 0 (Debug) The path: www/error.chi
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:4990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1319: 0 (Debug) Cookie: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1297: 0 (Debug) Content-Length: 17
redir.c: 1412: 0 (Debug) Serving file error.chi
redir.c: 2148: 0 (Debug) Process HTTP Request
redir.c: 2206: 0 (Debug) Running: /etc/chilli/wwwsh /etc/chilli/www/error.chi
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1192: 0 (Debug) http-request: GET /www/coova.jpg HTTP/1.1
redir.c: 1220: 0 (Debug) The path: www/coova.jpg
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:4990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1319: 0 (Debug) Cookie: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_5_8) AppleWebKit/534.50.2 (KHTML, like Gecko) Version/5.0.6 Safari/533.22.3
redir.c: 1412: 0 (Debug) Serving file coova.jpg
redir.c: 2148: 0 (Debug) Process HTTP Request
^Cchilli.c: 66: 0 (Debug) SIGTERM

Ik vind dat stukje aan het begin bij dat 169 adres trouwens ook wat 'raar', die auto-assignment range gebruik ik helemaal niet.

Net even getest: en vanaf localhost kan ik met het ingestelde radius secret gewoon de radius server querien.

Ik ben trouwens ook met dit ding bezig geweest, ondanks de niet al te beste kwaliteit van die documentatie (:X):https://help.ubuntu.com/community/WifiDocs/CoovaChilli

[ Voor 131% gewijzigd door Boudewijn op 08-01-2012 15:45 ]

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Goed , we zijn nog lekker aan het pielen (not).

Dit is mijn huidige logging:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:4990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
redir.c: 1426: 0 (Debug) -->> Setting userurl=[http://10.0.0.1:4990/favicon.ico]
redir.c: 2148: 0 (Debug) Process HTTP Request
redir.c: 2272: 0 (Debug) Processing received request
redir.c: 2504: 0 (Debug) redir_accept: Original request
redir.c: 2521: 0 (Debug) ---->>> challenge: 225a154331373b4dfd3b98b4c92c62b0
redir.c: 2113: 0 (Debug) Calling redir_getstate()
redir.c: 2139: 0 (Debug) Get HTTP Request
redir.c: 1192: 0 (Debug) http-request: GET /www/coova.html?loginurl=http%3a%2f%2f10.0.0.1%3a4990%2fwww%2flogin.chi%3fres%3dnotyet%26uamip%3d10.0.0.1%26uamport%3d3990%26challenge%3d225a154331373b4dfd3b98b4c92c62b0%26mac%3d00-1D-E0-45-B7-E9%26ip%3d10.0.0.2%26called%3d00-25-90-60-51-45%26nasid%3dnas01%26userurl%3dhttp%253a%252f%252f10.0.0.1%253a4990%252ffavicon.ico%26md%3dE86F9605B060FDE051293E50F66CE6EF HTTP/1.1
redir.c: 1220: 0 (Debug) The path: www/coova.html
redir.c: 1267: 0 (Debug) Query string: loginurl=http%3a%2f%2f10.0.0.1%3a4990%2fwww%2flogin.chi%3fres%3dnotyet%26uamip%3d10.0.0.1%26uamport%3d3990%26challenge%3d225a154331373b4dfd3b98b4c92c62b0%26mac%3d00-1D-E0-45-B7-E9%26ip%3d10.0.0.2%26called%3d00-25-90-60-51-45%26nasid%3dnas01%26userurl%3dhttp%253a%252f%252f10.0.0.1%253a4990%252ffavicon.ico%26md%3dE86F9605B060FDE051293E50F66CE6EF
redir.c: 1289: 0 (Debug) Host: 10.0.0.1:3990
redir.c: 1308: 0 (Debug) User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
redir.c: 1319: 0 (Debug) Cookie: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7
redir.c: 1412: 0 (Debug) Serving file coova.html
redir.c: 2148: 0 (Debug) Process HTTP Request

Zowel op poort 3990 (die redirect naar 4990) als op poort 80 werkt het egwoon niet. De error "an error has occurred" is ook om van te janken :/.
Direct naar hotspotlogin.cgi gaan levert op "login must be performed through chillispot daemon".

Zit er over te denken om toch maar Chillispot uit te rollen, ook al is dat project al 5 jaar zo dood als een pier :/.


Hmmz ik ga nog een keer met coova kijken of dit beter werkt:
http://linux.xvx.cz/2010/...ius-mysql-and-daloradius/

[ Voor 3% gewijzigd door Boudewijn op 11-01-2012 16:03 ]

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Bumpje; heeft iemand ervaring met de coovaAP firmware voor WRT54G's?
Die wil ik nu uiteindelijk maar inzetten; dit wordt anders echt helemaal niets :/.

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • Miepermans
  • Registratie: Oktober 2004
  • Niet online

Miepermans

BIEM!

Misschien niet helemaal waar je op zit te wachten, Maar ik weet dat mikotik dit ook ondersteunt. Het zou zomaar iets voor je kunnen zijn, aangezien dit redelijk goedkope routers zijn ( bijvoorbeeld RB750GL ) waarmee je een captive portal op kan zetten die met Radius geauthentificeerd word.

Ik ben er toevallig zelf ook mee aan het knutselen. Het liefste zou ik ook een losse linux doos hebben, met een captive portal erop. Echter is het met die miktrotik units gewoon té makkelijk te bouwen.

Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Mja ik wil toch wel met de ingekochte WRT54GL's aan de gang ;).

Ga nu eens kijken wat ik met dd-wrt kan en dan authenticeren tegen radius. Kijken of dat wel wil.

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • Thc_Nbl
  • Registratie: Juli 2001
  • Laatst online: 26-04 11:05
Hai heb je hier al eens gekeken, lijkt mij wat je wilt.
http://www.howtoforge.com/wifi_hotspot_setup

suc6

ehhh.. noppes


Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Inderdaad, maar ook die gebruikt de best verouderde chillispot software.

Nou ja we zijn toch maar voor dd-wrt gegaan; dit omdat het vrij snel afmoet (joepie :/.).

Goed, als ik nu netjes authenticeer bij mijn hotspot page (die vanaf de wrt54g komt), werkt dat niet.
Freeradius kan prima authenticeren dus er gaat iets niet lekker tussen hotspotlogin.cgi en freeradius.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
root@portal:/var/log/freeradius# radtest  -t  pap  test test 127.0.0.1  0 f62xuWaLZ37IazAkSCRLOfgoMm4fBKIPd8ij
Sending Access-Request of id 159 to 127.0.0.1 port 1812
    User-Name = "test"
    User-Password = "test"
    NAS-IP-Address = 127.0.1.1
    NAS-Port = 0
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=159, length=20
root@portal:/var/log/freeradius# radtest  -t  chap  test test 127.0.0.1  0 f62xuWaLZ37IazAkSCRLOfgoMm4fBKIPd8ij
Sending Access-Request of id 188 to 127.0.0.1 port 1812
    User-Name = "test"
    CHAP-Password = 0xbc3bdf3ebdb0c4b7d301ee3f61cfe2022b
    NAS-IP-Address = 127.0.1.1
    NAS-Port = 0
rad_recv: Access-Accept packet from host 127.0.0.1 port 1812, id=188, length=20

In beide gevallen kan ik dus authenticeren, of ik nu pap of chap gebruik . Chap is meer secure, maar dat boeit hier echt niet (er komt een wekelijks roulerend password ofzo).

Ik zie dat er dus pap wordt gebruikt door de hotspotlogin:
code:
1
Wed Jan 18 17:00:02 2012 : Auth: Login incorrect (rlm_pap: CLEAR TEXT password check failed): [test/test>Ol\310(.\nA\"\330\305\025] (from client 192.168.1.11 port 0 cli 00-1D-E0-45-B7-E9)


Freeradius eens herstart....

Maar goed, nu meldt de chillispot cgi page dat de login failt... en ik heb geen idee waarom.

code:
1
2
Wed Jan 18 17:25:22 2012 : Auth: Login incorrect (rlm_pap: CLEAR TEXT password check failed): [test/test8cA&#65533;?&#65533;N(\223'\024\365] (from client 192.168.1.11 port 0 cli 00-1D-E0-45-B7-E9)
Wed Jan 18 17:25:31 2012 : Auth: Login incorrect (rlm_pap: CLEAR TEXT password check failed): [test/test\024r\004\207\333\310\365\025*\201e\221] (from client 192.168.1.11 port 0 cli 00-1D-E0-45-B7-E9)

Goed, eens kijken of we dat op chap kunnen forceren.

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
En de boel werkt, het bleek een kwestie te zijn van zowel PAP als MSCHAP uitzetten in de hotspotlogin cgi.

Paar puntjes staan nog open:

1; Ik wil dat users als ze ingelogd zijn altijd naar google.com worden geredirect (om maar wat te noemen). Blijkens de manpage va chilli kan dat met uamhomepage https://google.com/ .
Punt is dat nu alle pages worden geredirect naar google.com; dat browset niet erg lekker.
2: ik vraag me af (heb even geen test-mogelijkheid) of meerdere gebruikers tegelijkmet dezelfde login in kunnen loggen; dat zou een pre zijn.
3: Eens kijken wat er mogelijk is met een php pagina in plaats van die gare hotspotlogin.cgi . Eens kijken wat de mogelijkheden daartoe zijn.

Iemand aanraders/ervaringen/tips?

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • CAPSLOCK2000
  • Registratie: Februari 2003
  • Laatst online: 17:44

CAPSLOCK2000

zie teletekst pagina 888

Wat betreft punt 1, ik zou de inlog-pagina van de hotspot aanpassen, om na een succesvolle login een redirect te doen.

This post is warranted for the full amount you paid me for it.


Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Goed punt, dat is op zich ook een mogelijkheid. dank!

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier


Acties:
  • 0 Henk 'm!

  • Boudewijn
  • Registratie: Februari 2004
  • Niet online

Boudewijn

omdat het kan

Topicstarter
Tijd voor een schop.

Ik heb dit probleem destijds opgelost door de Hotspot module in dd-wrt te gebruiken, en dat heeft prima gewerkt. Nu is er ergens iets gebeurd (waarvan ik niet weet wat...) en draait de boel niet meer.

Mijn wireless clients krijgen een IP in het 'voor aanmelden' netwerk: 192.168.182.x.
Prima, maar ze worden niet geredirect naar de hotspotlogin pagina.

Deze pagina is wel gewoon bereikbaar vanaf de clients op 192.168.1.200/cgi-bin/hotspotlogin.cgi, maar als ik daar met de hand naartoe ga meldt de pagina netjes dat ik via de chillispot daemon geredirect moet worden.

Het lijkt er dus op dat deze laatste niet lekker draait op die dd-wrt gebakjes. Heeft iemand een idee waar ik hier snel de vinger op de zere plek kan leggen?

De nic op de server met daarop de login pagina, en de radius server staat op 192.168.1.200 (er is ook nog een WAN nic in dat ding) en zit dus niet in die 192.168.182 range, maar dat is afaik ook niet de bedoeling.

edit:

Ghehe en toen bleek mijn iptables script niet gerund te worden bij reboot.... dom.

code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
root@portal:~# cat /etc/router.sh 
#!/bin/sh

PATH=/usr/sbin:/sbin:/bin:/usr/bin

#
# delete all existing rules.
#
iptables -F
iptables -t nat -F
iptables -t mangle -F
iptables -X

# Always accept loopback traffic
iptables -A INPUT -i lo -j ACCEPT


# Allow established connections, and those not coming from the outside
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A INPUT -m state --state NEW -i ! eth0 -j ACCEPT
iptables -A FORWARD -i eth0 -o eth1:1 -m state --state ESTABLISHED,RELATED -j ACCEPT

# Allow outgoing connections from the LAN side.
iptables -A FORWARD -i eth1:1 -o eth0 -j ACCEPT

# Masquerade.
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

# Don't forward from the outside to the inside.
iptables -A FORWARD -i eth0 -o eth0 -j REJECT

# Enable routing.
echo 1 > /proc/sys/net/ipv4/ip_forward

Helpt wel ja :+.

[ Voor 46% gewijzigd door Boudewijn op 17-03-2012 17:39 ]

Ik heb elektra-inbouwmaterialen over? Kopen? Zie: hier

Pagina: 1