<div dir="ltr">I'm trying to setup tproxy with Squid 3.5 for the purpose of having the same outgoing ip as the connecting ip. (I have thousands of IPs and I can not add them one by one)<div><br></div><div>I started with a fresh install of Debian 9, installed Squid by</div><div><br></div><div>apt install squid</div><div><br></div><div>then I added </div><div><br></div><div><div>http_port 3129 tproxy</div></div><div><br></div><div>to squid.conf</div><div><br></div><div>I then ran the following commands for iptables</div><div><br></div><div><div>iptables -t mangle -N DIVERT</div><div>iptables -t mangle -A DIVERT -j MARK --set-mark 1</div><div>iptables -t mangle -A DIVERT -j ACCEPT</div></div><div><br></div><div>iptables  -t mangle -A PREROUTING -p tcp -m socket -j DIVERT<br></div><div><br></div><div>iptables  -t mangle -A PREROUTING -p tcp --dport 80 -j TPROXY --tproxy-mark 0x1/0x1 --on-port 3129<br></div><div><br></div><div><br></div><div>I can use the proxy with no problems on port 3128, but on Firefox I get a message "The proxy server is refusing connections" when I set the proxy to port 3129. Did I miss any steps or am I doing something wrong?</div><div><br></div><div>below is my full squid.conf file</div><div><br></div><div><div>acl SSL_ports port 443</div><div>acl Safe_ports port 80</div><div>acl Safe_ports port 21</div><div>acl Safe_ports port 443</div><div>acl Safe_ports port 70</div><div>acl Safe_ports port 210</div><div>acl Safe_ports port 1025-65535</div><div>acl Safe_ports port 280</div><div>acl Safe_ports port 488</div><div>acl Safe_ports port 591</div><div>acl Safe_ports port 777</div><div>acl CONNECT method CONNECT</div><div>http_access deny !Safe_ports</div><div>http_access deny CONNECT !SSL_ports</div><div>http_access allow localhost manager</div><div>http_access deny manager</div><div>http_access allow localhost</div><div>http_access allow all</div><div>http_port 3128</div><div>http_port 3129 tproxy</div><div>coredump_dir /var/spool/squid</div><div>refresh_pattern ^ftp:           1440    20%     10080</div><div>refresh_pattern ^gopher:        1440    0%      1440</div><div>refresh_pattern -i (/cgi-bin/|\?) 0     0%      0</div><div>refresh_pattern .               0       20%     4320</div></div><div><br></div></div>