0

This question already has an answer here:

I set up my iptables on my raspberry pi to redirect ALL traffic to localhost where my landing page is hosted, so that people on my AP can't access internet without logging in(correctly) first. On the back end there's a java servlet running where I possibly have to do all this. How can I make it so that when someone has a valid login, the iptable(NAT) rules get altered which grants them internet access?

marked as duplicate by Milliways, Ingo, Dmitry Grigoryev, Ghanima Jan 23 at 22:21

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • I doubt you can use IPTABLES (easily) for per "session" rules – Jaromanda X Jan 14 at 1:25
  • There is really everything unclear. You are talking about AP, RasPi, NAT, landing page on localhost (is localhost a device?), login, back end, iptables, java servlet, internet access without any visible context. Can you please explain? – Ingo Jan 14 at 21:36
  • What you want is called a captive portal, and implementing one was already discussed here, here and here – Dmitry Grigoryev Jan 15 at 8:18

Browse other questions tagged or ask your own question.