iptables, I redirect all the traffic - incoming at port 80 - to a distant server IP (X.X.X.X). I aim that anywhat you write in the urlbar of browser, you get X.X.X.X.
- IP That works a charm with IP (If I request 188.8.131.52, I fallback on X.X.X.X).
- Resolved Domain (In
dnsmasqI set server=184.108.40.206, Google DNS): redirect is ok (ex: lolipop.fr => X.X.X.X)
- Unresolved Domain : it does not work with domain, e.g. : http://stackexchange.com is not 'redirected' to X.X.X.X. (e.g.: whateverxlkjg.de => DNS UNRESOLVED ERROR)
Obviously, dnsmasq runs before iptables, and return solve error in step 2. Stopping the process...
My question is:
How can I ensure IP, Solved domain and unsolved domain traffic redirection with iptables (I cannot/dontwant to use
I understand it is a tricky question... Please be indulgent.