0

I've setup my RaspberryPi(NOOBS) as WiFi router by following online guides. Yep, I'm running hostapd and isc-dhcp-server on it. I directly plugged in RJ45 cable provided by my internet provider in to the RaspberryPi. I've also installed samba server and attached an hard disk to my PI and made a NAS! I gave all my network devices except a Windows laptop, fixed IPs in dhcp configuration. I also installed bind9, setup a local domain and assigned names to all my network devices(Macbook, Android phone) except to my Windows laptop and I've set 8.8.8.8, 8.8.4.4 as forwarders.

Everything worked damn great! My joy is boundless!! But Just for one day!!!

I've powered down my entire grid and gone to sleep contently. Next day when I tried to open google from my Mac, it didn't! Generally I'm redirected to my ISP's login page if I'm not logged in. But this morning It just showed You Are Not Connected to the Internet page :(

pi@raspberrypi ~ $ uname -a
Linux raspberrypi.ferryfair.com 3.18.11+ #781 PREEMPT Tue Apr 21 18:02:18
BST 2015 armv6l GNU/Linux

pi@raspberrypi ~ $ ifconfig
eth0      Link encap:Ethernet  HWaddr b8:27:eb:74:e9:68
          inet addr:172.16.6.252  Bcast:172.16.7.255  Mask:255.255.252.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22566 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12910 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:8120517 (7.7 MiB)  TX bytes:2073654 (1.9 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:26 errors:0 dropped:0 overruns:0 frame:0
          TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2066 (2.0 KiB)  TX bytes:2066 (2.0 KiB)

wlan0     Link encap:Ethernet  HWaddr 28:c6:8e:f8:5c:4f
          inet addr:192.168.10.1  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:22583 errors:0 dropped:272 overruns:0 frame:0
          TX packets:14009 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:3607671 (3.4 MiB)  TX bytes:7818043 (7.4 MiB)

pi@raspberrypi ~ $ cat /etc/resolv.conf
nameserver 202.65.144.180
nameserver 202.65.130.254

Now I tried with Windows laptop to which I didn't assign fixed IP in the Pi's dhcp configuration. As soon as windows laptop connected to Pi's wifi, the ISP's login page popped up, I gave credentials and I could browse internet! And after few minutes I could even browse on fixed IP devices!

Is it the problem with my DHCP configuration?

pi@raspberrypi ~ $ cat /etc/dhcp/dhcpd.conf

ddns-update-style none;

default-lease-time 600;
max-lease-time 7200;

authoritative;

log-facility local7;

subnet 192.168.10.0 netmask 255.255.255.0 {
 range 192.168.10.10 192.168.10.20;
 option broadcast-address 192.168.10.255;
 option routers 192.168.10.1;
 default-lease-time 600;
 max-lease-time 7200;
 option domain-name "ferryfair.com";
 option domain-name-servers 192.168.10.1;

 # MacBook
 host TwinkleMoss {
         hardware ethernet a4:5e:60:d4:09:a3;
         fixed-address 192.168.10.2;
 }

 # Android
 host EbonyCrystal {
         hardware ethernet 14:30:c6:c4:29:87;
         fixed-address 192.168.10.3;
 }
}

What should I do to get the ISP's login page from dhcp fixed Ip devices. with out logging in with the ISP I can't even ping DNS servers provided by my ISP from the RaspberryPi or fixed Ip devices!

  • This is a tough one. You basically are asking for something like a captive portal that will forward you to the ISP login page. What I'm wondering is: why can't the Pi log into your ISP for you? – WineSoaked Aug 12 '15 at 5:46
  • @winesoaked Yeah! I didn't understand either. I connected a monitor and tried opening google in chrome; It showed unable to connect internet instead of redirecting to the captive portal. – Necktwi Aug 12 '15 at 8:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.