0

I did a bit of research but I think my google is failing me. I know there are options where you can use the pi as a hotspot and have a captive portal. I was wondering if it is possible to have a setup where just by plugging a raspberry pi via ethernet or USB to a router and the pi being connected to the network everyone trying to access the network will be presented with a captive portal?

Not sure if I am explaining myself correctly.

3

I was wondering if its possible to have a setup where just by plugging a raspberry pi via ethernet or usb to a router and the pi being connected to the network everyone trying to access the network will be presented with a captive portal?

No. Captive portal must somehow intercept and redirect the client's traffic.

It would be a disaster if plugging a device into a properly configured network would allow for interception and manipulation of other devices' communication.

Redirection in captive portals is performed usually either using DNS or ICMP.

In the first method the DNS settings must be altered. In a typical scenario, which you described, these settings are provided by the router or access point to the client machines. Just plugging Raspberry Pi into the network will not alter router's (or AP's) settings.

In the second, Pi would have to route packets for the client - again, connecting the device to the network will not alter client's communication path.

  • What if you change the router not to be dhcp server anymore and use the pi as dhcp server. Then any dynamicly configured device on the network have dns from the pi. Use a dhcp server and dns server on the pi and you are good to go. – solsTiCe Dec 9 '16 at 13:28
  • That's why I intentionally wrote "properly configured network". It's left to readers' discretion what might be achieved on a misconfigured one and it was not the point of the question. – techraf Dec 9 '16 at 13:35
1

Obviously, it's the wrongest way! Actually, if you do that, you remove the functionality of the router.
I recommend trying to install OpenWrt on your router if it's possible. It has a captive portal (nodogsplash) feature by own.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.