I have created a hotspot from my laptop using hotspotd (https://github.com/prahladyeri/hotspotd). I want to do the following:

Whenever a new device tries to connect to my hotspot, I want it to be connected to my network but it should not have access to the internet. Only after a TCP/UDP communication between the new device and the device on which I am running the device, will it be allowed internet access. Is it possible, and if so please suggest some ideas. I am trying to do this in linux.

  • As an idea. Create 2 DHCP scopes. The scope used first have all addresses occupied with static leases (most part - fake), second scope, with free-to-use addresses, do not provide default gateway to client, so client can communicate within the subnet only. To register this device and allow it to access Internet you edit any fake static lease in the first scope with device's MAC, so next time the device will obtain address and correct default gateway, and it can communicate freely. – Akina Aug 10 at 10:38
  • Can we create two DHCPscopes using only one NIC, or do we need two? – Shreya Saha Aug 10 at 14:58
  • You may have not NICs at all - it do not interfere. Scope is an operation section of DHCP server. – Akina Aug 10 at 17:55
  • Say a device does not have internet access and can communicate within the subnet only. Now, after TCP/UDP communication, it is authenticated. Can it be directlt given internet access withoout it being disconnected from the network? – Shreya Saha Sep 28 at 10:44

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.