BRN:Software:HTTP-Redirect
Jump to navigation
Jump to search
- 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
- 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
- (optional) If you do not have access to a DNS server install a DNS local resolver (TODO)
- 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