Trace: squid_di_openbsd

aktifkan ip_forward

bash-3.2# sysctl net.inet.ip.forwarding=1
net.inet.ip.forwarding: 0 -> 1

Install squid

bash-3.2# pkg_add -iv squid
Ambiguous: choose package for squid
         0: <None>
         1: squid-2.7.STABLE3
         2: squid-2.7.STABLE3-ldap
         3: squid-2.7.STABLE3-ldap-snmp
         4: squid-2.7.STABLE3-snmp
Your choice: 1 <enter>        

Keterangan pre instalasi

--- squid-2.7.STABLE3 -------------------
NOTES ON OpenBSD POST-INSTALLATION OF SQUID 2.7

The local (OpenBSD) differences are:
configuration files are in              /etc/squid
sample configuration files are in       /usr/local/share/examples/squid
error message files are in              /usr/local/share/squid/errors
sample error message files are in       /usr/local/share/examples/squid/errors
icons are in                            /usr/local/share/squid/icons
sample icons are in                     /usr/local/share/examples/squid/icons
the cache is in                         /var/squid/cache
logs are stored in                      /var/squid/logs
the ugid squid runs as is               _squid:_squid

Please remember to initialize the cache by running "squid -z" before
trying to run Squid for the first time.

You can also edit /etc/rc.local so that Squid is started automatically:

    if [ -x /usr/local/sbin/squid ]; then
        echo -n ' squid';       /usr/local/sbin/squid
    fi

tambahkan tiga baris terakhir di /etc/rc.local agar squid otomatis di jalankan ketika komputer booting, kemudian sesuaikan config squid di /etc/squid/squid.conf

Tambahan : kalo mau transparent silahkan ditambahkan rules berikut di /etc/pf.conf

rdr on $ext_if proto tcp from $lan_net to any port 80 -> 127.0.0.1 port 3128

Catatan tambahan

jika ingin menggunakan autentikasi ldap, tambahkan baris berikut di squid.conf :

auth_param basic program /usr/local/libexec/squid_ldap_auth -b "dc=xxx,dc=xx,dc=xx" -f "uid=%s" -h ldap.server
acl ldap proxy_auth REQUIRED
http_access allow lan ldap
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki