Results 1 to 6 of 6

Thread: squid + iptables

Threaded View

  1. #1

    squid + iptables

    Hi all,

    I have installed SQUID on a SLES 12 server.
    The server ( is in a DMZ.

    If in Firefox I change the following settings ...
    proxy server:
    port: 3128
    ... all is working correctly.

    The problem is that I do not want to manually change the configuration of all the browsers in the LAN and therefore I use iptables to forward the http requests to the prox server (
    As described in "" I have done some changes in my firewall.
    As a first step I want to enable the proxy server only for my PC (

    Here the changes I have done in the firewall:
    iptables -t nat -A PREROUTING -i eth0 -s -p tcp --dport 80 -j DNAT --to
    iptables -t nat -A POSTROUTING -o eth0 -s -d -j SNAT --to

    eth0 is the interface to LAN is my PC (connected on the LAN) is the "DMZ interface" on the Firewall

    After this change I cannot connect to the Internet from my PC and in /var/log/squid/access.log I see following lines:
    1416934683.591 0 NONE/400 3440 GET / - HIER_NONE/- text/html
    1416934683.823 0 NONE/400 3468 GET /Artwork/SN.png - HIER_NONE/- text/html

    In squid.conf I have tryed to change the following line:
    old -> http_port 3128
    new -> http_port 3128 intercept

    but after this change nothing appears in /var/log/squid/access.log

    In other words:
    if I configure my browser to use the proxy server all is working correctly
    but I have problems with iptables to forward the http requests to the prox server

    Thanks a lot for any help.
    Last edited by mrezzonico; 25-Nov-2014 at 18:34.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts