HOWTO: set up a transparent squid proxy on an Ubuntu desktop box (geekery, rant)
by at 5:11 PM
Here is a simple procedure for setting up a simple transparent proxy to conduct basic network testing of some connected device, when your desktop box is running Ubuntu Linux.
- Disable NetworkManager with sudo update-rc.d NetworkManager remove; killall nm-applet
- Set up your network cards explicitly in /etc/network/interfaces (this isn't hard, but NetworkManager's duty in life is to crap on this configuration, it seems) and do a sudo /etc/init.d/networking restart
- Install dhcp3-server and squid, and configure them as appropriate. Most important is to change the squid.conf line like
tohttp_port 3128http_port 3128 transparent - Use FireHOL for the actual iptables configuration, because life is too short to screw around with iptables scripts and tutorials that don't specify where said scripts go if you want things to actually, you know, work. My /etc/firehol/firehol.conf file is like this:
version 5 transparent_proxy 80 3128 proxy interface eth0 outside policy accept server http accept server ssh accept server https accept client all accept interface eth1 inside policy accept router nat inface eth1 outface eth0 masquerade route all accept
- Angrily post this article to your blog because seriously why does Ubuntu documentation have to suck so bad
Comments