What's new

Assistance with configuring squid transparent proxy

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

minhgi

Regular Contributor
So I finally gotten Squid to install and loaded on a AC-5300 using AsusWRT-Merlin 380.55 alpha2. It took me a month just to get there. Thanks to the genius devs in the forum for the customs firmware. My next step was to setup the transparent proxy; however I wasn't able to find much information about how to setup the iptables for the firmware. The step I gotten to was creating a squid.sh file. Other than that, I have no idea where and how to place it or anything after that. So close and far to being near goal. Any help would be appreciate.

#!/bin/sh

PROXY_IP=192.168.1.1
PROXY_PORT=3128
LAN_IP=`nvram get lan_ipaddr`
LAN_NET=$LAN_IP/`nvram get lan_netmask`

iptables -t nat -A PREROUTING -i br0 -s $LAN_NET -d $LAN_NET -p tcp --dport 80 -j ACCEPT
iptables -t nat -A PREROUTING -i br0 -s ! $PROXY_IP -p tcp --dport 80 -j DNAT --to $PROXY_IP:$PROXY_PORT
iptables -t nat -I POSTROUTING -o br0 -s $LAN_NET -d $PROXY_IP -p tcp -j SNAT --to $LAN_IP
iptables -I FORWARD -i br0 -o br0 -s $LAN_NET -d $PROXY_IP -p tcp --dport $PROXY_PORT -j ACCEPT
 
Question, is the traffic monitoring functionality built-in to the merlin firmware insufficient for your needs, and if so, how so? I do not have one yet, I am doing some research on if I can make the ASUS router work for some required network access monitoring on a per device level.

If the firmware is linux based, I would research Iptables rules for a linux based router. I would then also get a list of routing and networking commands built into the firmware and make sure the relevant options with switches are being used. Without having one to play with in person I can't help much more than that.
 

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top