<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Ciao raga,</p>
    <p>ho un problemino con CoovaChilli... mi fa il login ma non mi da
      accesso a internet...<br>
      Cosa può essere? queste sotto sono le mie config.<br>
      <br>
    </p>
    <pre>config chilli 'chilli1'
    option acctupdate '1'
    option defbandwidthmaxdown '2000000'
    option defbandwidthmaxup '2000000'
    option defidletimeout '300'
    option defsessiontimeout '10800'
    option dns1 '8.8.8.8'
    option dns2 '8.8.4.4'
    option dnsparanoia '1'
    option ipdown '/etc/chilli/down.sh'
    option ipup '/etc/chilli/up.sh'
    option radiusserver1 'controller.nnxx.ninux.org'
    option redir '1'
    option tundev 'tun0'
    option uamhomepage '<a class="moz-txt-link-freetext" href="https://wifi.nnxx.ninux.org">https://wifi.nnxx.ninux.org</a>'
    option uamserver '<a class="moz-txt-link-freetext" href="https://wifi.nnxx.ninux.org">https://wifi.nnxx.ninux.org</a>'
    option dhcpif 'br-hotspot'
    option radiusserver2 'controller.nnxx.ninux.org'
    option uamallowed 'wifi.nnxx.ninux.org,192.168.182.1'</pre>
    <pre>
config interface 'hotspot'
    option dns '86.107.110.93 8.8.8.8 8.8.4.4'
    option dns_search 'basilicata.nnxx'
    option ifname 'captive-wlan'
    option ipaddr '192.168.50.1'
    option netmask '255.255.255.0'
    option proto 'static'
    option type 'bridge'</pre>
    <pre>
config interface 'captive_wlan'
    option ifname 'captive-wlan'
    option proto 'none'</pre>
    <pre>
config wifi-iface 'wifi_captive_wlan'
    option device 'radio0'
    option ifname 'captive-wlan'
    option isolate '1'
    option mode 'ap'
    option network 'hotspot'
    option ssid 'ninux.org-hotspot'
    option wds '0'
    option encryption 'none'</pre>
    <pre>
root@salotto:~ # route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface</pre>
    <pre>0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0.2
10.27.10.0      10.27.253.27    255.255.255.0   UG    50     0        0 vpnbas
10.27.22.0      10.27.253.17    255.255.255.0   UG    50     0        0 vpnbas
10.27.25.0      0.0.0.0         255.255.255.0   U     0      0        0 br-lan
10.27.253.0     0.0.0.0         255.255.255.0   U     0      0        0 vpnbas
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0.2
192.168.50.0    0.0.0.0         255.255.255.0   U     0      0        0 br-hotspot
192.168.182.0   0.0.0.0         255.255.255.0   U     0      0        0 tun0

</pre>
    <pre>root@salotto:~ # iptables -L -v |grep tun0
    0     0 ACCEPT     icmp --  tun0   any     anywhere             192.168.182.1       
    0     0 ACCEPT     udp  --  tun0   any     anywhere             192.168.182.1        udp dpt:domain
    0     0 ACCEPT     udp  --  tun0   any     anywhere             192.168.182.1        udp dpts:bootps:bootpc
    0     0 ACCEPT     udp  --  tun0   any     anywhere             255.255.255.255      udp dpts:bootps:bootpc
    0     0 ACCEPT     tcp  --  tun0   any     anywhere             192.168.182.1        tcp dpt:3991
   15  1773 ACCEPT     tcp  --  tun0   any     anywhere             192.168.182.1        tcp dpt:3990
    0     0 DROP       all  --  tun0   any     anywhere             192.168.182.1       
   85 10239 ACCEPT     all  --  tun0   eth0.2  anywhere             anywhere            
    0     0 DROP       all  --  tun0   !eth0.2  anywhere             anywhere            
  116 18734 ACCEPT     all  --  any    tun0    anywhere             anywhere            
    0     0 ACCEPT     all  --  tun0   any     anywhere             anywhere            

</pre>
    <p>il file /etc/chilli/ipup.sh è:</p>
    <pre>if [ "$(iptables -L -v -n --line-numbers -t nat | grep MASQUERADE | grep -c $HS_WANIF)" -eq "0" ]; then
  iptables -I POSTROUTING -t nat -o $HS_WANIF -j MASQUERADE
fi

</pre>
  </body>
</html>