2

I have configured my server with iptables rules in order to forward all traffic to a specific domain. Those are NAT rules and the redirection works fine as long as I have internet access. But when internet is off, of course the forwarding doesn't work anymore.

Is there's a way to redirect all the url to a specific domain without internet access?

From what I have observed, if I plug and internet cable and then unplug it, the redirection still works for about 10 minutes, so there must be some daemon running still performing the forwarding.

Someone said that my NAT is not redirecting because the DNS is not working anymore. But I have no idea what to do, and what could be the best tool fitted for it. I have tried socat in order to redirect socket, but with no luck.

So do you have any strategy on how I could perform it. I know this is possible because when I unplug my Ethernet cable, I can't access to internet anymore but the URL are still forwarded for at least 10 minutes. So if there is a simple an hackish way to to it, you'll be welcome. My intention are those: someone connect to the hostapd (without internet connection), enter any URL, and then redirected to my server.

Citizen
  • 1,103
  • 1
  • 10
  • 19
Mr Bonjour
  • 121
  • 1
  • 1
  • 4

0 Answers0