0

I'm trying to run squid proxy

I have tried to do as it said here :

https://www.tecmint.com/install-squid-in-ubuntu/

but it isn't working.

This is my squid.conf : (all other lines are # )

# Example rule allowing access from your local networks.
# Adapt to list your (internal) IP networks from where browsing
# should be allowed
acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
acl localnet src 172.16.0.0/12  # RFC1918 possible internal network
acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
#acl localnet src fc00::/7       # RFC 4193 local private network range
#acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines
acl localnet src 10.0.0.188 # David Computer
acl SSL_ports port 443
acl Safe_ports port 80      # http
acl Safe_ports port 21      # ftp
acl Safe_ports port 443     # https
acl Safe_ports port 70      # gopher
acl Safe_ports port 210     # wais
acl Safe_ports port 1025-65535  # unregistered ports
acl Safe_ports port 280     # http-mgmt
acl Safe_ports port 488     # gss-http
acl Safe_ports port 591     # filemaker
acl Safe_ports port 777     # multiling http
acl CONNECT method CONNECT

acl bad_urls dstdomain "/etc/squid/blacklisted_sites.acl"
acl good_url dstdomain "/etc/squid/good_sites.acl"
#http_access deny bad_url


# Deny requests to certain unsafe ports
http_access deny !Safe_ports

# Deny CONNECT to other than secure SSL ports
http_access deny CONNECT !SSL_ports

# Only allow cachemgr access from localhost
http_access allow localhost manager

http_access deny manager


#http_access allow localnet
http_access allow localhost

# And finally deny all other access to this proxy

#http_access deny all
http_access allow all

# Squid normally listens to port 3128
http_port 3128 transparent

acl bloclsite1 dstdomain yahoo.com
acl blocksite2 dstdomain www.rediff.com
#http_access deny www.yahoo.com
#http_access deny blocksite1

acl blockkeyword1 url_regex gmail
http_access deny bad_urls
http_access allow good_url
http_access deny blockkeyword1

all sites are getting ERR_TIMED_OUT

Could someone please explain why? or maybe send a link to a simple working conf file ?

  • you forgot to include your squid.conf. – tatsu Jul 1 '19 at 15:00
  • I have added now , – Korenron Jul 3 '19 at 8:19
1

When you use squid as a http(s) proxy, you are doing MTM. Sites with HSTS will not accept traffic between the proxy and the browsers to run over http. If you want to use a https proxy, you need to create your own certificate and import it in the browser. You can try this: https://elatov.github.io/2019/01/using-squid-to-proxy-ssl-sites/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.