BRN:Software:HTTP-Redirect

From
Revision as of 11:18, 11 January 2007 by Jeschke (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. You need to route all http and dns packets in your click graph from wireless stations to the Linux kernel and it's local/serv device. Modify the main click configuration:
#TODO
  1. Rewrite the destination the DNS queries to your DNS server and masquerade the source adddress (at the access point):
$ iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to 192.168.3.1:53
$ iptables -t nat -A POSTROUTING -d 192.168.3.1 -p udp --dport 53 -j MASQUERADE
  1. (optional) If you do not have access to a DNS server install a DNS local resolver (TODO)
  2. Now you can redirect the HTTP queries to your local httpd:

$ iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to 10.9.0.1:80