I'm using my computer as wireless access point and router to my home network using hostapd under Ubuntu 14.04. I want to transparently proxify certain wifi devices in the network (identified by their MAC addresses). How do you propose I go about doing that? I think a combination of squid and iptables should do the trick, but I don't have more than a cursory knowledge of these.


I managed to solve this myself:

sudo iptables -t nat -A PREROUTING -m mac --mac-source "MAC-ADDRESS" -p tcp --dport 80 -j REDIRECT --to-port 33128

Squid is running on port 33128. I had to write this in squid.conf so that transparent proxy-ing works correctly:

http_port 33128 transparent
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.