Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a rather strange request and one I'm not even sure is possible. I'm attempting to setup a public hotspot for a few sites. I would like to try and implement an "AnyIP" solution where the gateway will respond and act as if it's the gateway for ANY ip subnet. I know that nomadix gateways used to do this as well as a project called coovaAP (coovaChilli). I've also heard this referred to as IP plug-n-play.
Basically if a person attempts to access the public hotspot and they have a static IP of 192.168.100.14 configured w/ a static gateway of 192.168.100.1 and the hotspot gateway does not specifically have an interface with that subnet it will respond as if it were 192.168.100.1.
These solutions seems to use an application (chillispot) that works at layer 2 and is replying to all arp requests that come in as if it were some mac based router/gateway. I know the anyIP/ippnp seems to be a marketing term and really seems to be some screwy black magic networking but I have to try and set something up like this.
My question; is this possible with something like proxy ARP or something else other the chillispot?
I've been looking around for days and days but I'm not sure what to look for exactly so I've come up short.
These are done locally. To be straight, that's not the way they do it. They use
1. a dhcp server giving short licenses, and force feeding your local dns servers to them.
2. Numerous (serverless) wireless routers with the same network card number, so you can wander from one to another without losing connection.
3. A local dns server, and httpd server serving a blocked page. Some also have a login page, or one where you accept their terms of service. This way you can control network use. In Ireland this is a necessity as child porn is illegal, and downloading on a large scale is expensive. It's also used in Colleges to kill off the social networking sites as a waste of computer resources.
4. A firewall, blocking outgoing dns. What would be really clever is an app picking up all dns except the stuff directed at your dns server and redirecting it.
What loses out in this arrangement is the smartphone apps. Only a smartphone browser works. Perhaps that's not such a bad thing from your perspective.
What you are describing is simply how a hotspot works. I already have in place a dhcp server which points connected clients to my dns server and all the firewall rules to block all users who have not authenticated with our system. That bit is all fairly straight forward. The issue i'm having now is how these other products are able to do "AnyIP" also known as "IPPNP" or "Dynamic NAT".
The current method we use works great if a users users dhcp or sets a static IP on a subnet we are listening on, the issue comes now how to redirect and work for users with static IP's on a subnet we do not operate on, or who are pointed to another static DHCP server. The basic idea is that users of the hotspot would never have to reconfigure their network cards, ip addresses or settings (most of the time).
Dynamic NAT is another way i've heard of this, which i assume means that the gateway keeps track of all arp requests, and sets up dynamically a 1:1 NAT between the users network and the main gateway's network and then just translates it there. But I've never tried messing with that.
What you are trying to do mightn't be that difficult. If you set everything on auto, close browser & reboot/restart network, everything comes good if you have network connections (even wifi) in init. This actually asks questions, though of all other networks a box might be on. To illustrate: I used to set DHCP_KEEPRESOLV to yes, to avoid overwriting my dns servers of choice, opendns. When I went to places like College, this was no good as opendns was blocked. So I had to make a change there, at which point I couldn't get dns at home. I finally got our modem dropping the isp's dns and serving opendns, which was not intuitive for it, to put it mildly. For windows, the set to auto & reboot works, as also, I believe for macs.
Normally a dhcp client roots through it's leases (at least as far as the last one) and says "Can I use this?" I think it's the DHCP_REQUEST part. If your range of IPs for dhcp was 10.0.x.x & 192.168.x.x ranges, it would surely say yes to any sensible ip. Then the only thing would be if someone else already had that IP, of if a laptop came in configured with a non standard static ip.
all users should have to reconfigure to your dns servers, and if there are any possible legal issues are in the background you will also have to get the user's approval of your Terms of Service. Given the current situation, I'd take that as a necessity.
I have not yet found an easy solution or even if it's possible with prebuilt tools. I've decided to attempt to build my own solution using libpcap to kick off iptable rules to either setup a 1:1 NAT to a pool of private IP's or perhaps it can be done in a more simple manner. Since my hotspots already have an application to track users and authenticate them via our login page it should be a simple enough task to extend and add some functionality there.
Honestly business_kid thanks for your replies but your talking about something completely different then what I'm trying to do. I'm looking for a way to implement an "AnyIP" solution... the keyword there is Any, In other words the gateway will facilitate connections from clients on a 10.0.0.0/24 network and clients on a 192.168.0.0/24 network and clients on a 172.15.10.0/26 network and clients configured as static and clients configured as DHCP with default gateways pointed to w.x.y.z etc etc. The point is to handle those non-standard static IP's.
It's black magic voodoo networking that i'm sure will make all sorts of things break but I wanted to see if it was possible and how to do it. just like the other projects and commercial gateway products do (Mikrotik, Nomadix, CoovaChilli, etc).
Your only option there (any ip) is to see what dhcpd.conf will allow you to do.
If that is accepting of anything between 0.0.0.0 & 255.255.255.255 is that your problem solved?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.