Find the answer to your Linux question:
Results 1 to 10 of 10
Sir in my office I use centos 5 with squid proxy eth0 is connected to modem (adsl-setup) eth1 is connected to lan 172.16.0.3 all client access internet with 172.16.0.3 and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2006
    Posts
    39

    access internet without any proxy setting in browser


    Sir
    in my office I use centos 5 with squid proxy
    eth0 is connected to modem (adsl-setup)
    eth1 is connected to lan 172.16.0.3

    all client access internet with 172.16.0.3 and 3128 proxy setting.

    Now I want to access internet through squid without proxy setting, such as 172.16.0.3 as gateway

    please guide me the steps
    Attached Files Attached Files

  2. #2
    Just Joined!
    Join Date
    Aug 2011
    Posts
    35
    when you say access internet through squid that means you'll use the proxy server. But if you wan access directly you need to check if 172.16.0.3 will let you do it (NAT enabled) all you have to do is to set the ip as your default gateway and set a DNS let's say 8.8.8.8 (google's dns) and see if you get a response when you ping an address (google.com for example).

  3. #3
    Just Joined!
    Join Date
    Jul 2006
    Posts
    39
    Thanks for your reply. can you please guide how to enable NAT so that I can set 172.16.0.3 as gateway to access internet. I have another problem is I have to block certain ip to access certain sites and to download certain file type.

    please help.

  4. #4
    Linux User cyberinstru's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    362
    Hi -

    Check out for more details on how to setup a transparent proxy with Squid.

    Squid's transparent proxy should help you do what you have asked for.

    If you end in trouble, let us know.

    HTH!
    ---------------------------------
    Registered Linux User #440311
    HI2ARUN _AT_ GMAIL _DOT_ COM
    ---------------------------------

  5. #5
    Just Joined!
    Join Date
    Jul 2006
    Posts
    39
    I have tried transparent proxy but failed, please guide me the steps. I have mentioned my setup details .


    thanks in advance.

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672
    What have you done to setup the transparent proxy and why did it not work?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #7
    Just Joined!
    Join Date
    Jul 2006
    Posts
    39
    Sir

    In my centos 5 server
    eth0 is connected to ppp for internet (adsl-setup)
    eth1 is connected to lan 172.16.0.3
    in squid

    http_port 172.16.0.3:3128 transparent

    #iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 172.16.0.3:3128
    #iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128

    but when I use proxy setting in client browser I can access internet, but whn no proxy and gateway 172.16.0.3, I can not access.

  8. #8
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,672

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  9. #9
    Just Joined!
    Join Date
    Jul 2006
    Posts
    39
    Sir

    I have tried but no result. and
    httpd_accel_host virtual
    httpd_accel_port 80
    httpd_accel_with_proxy on
    httpd_accel_uses_host_header on
    acl lan src 192.168.1.1 192.168.2.0/24
    http_access allow localhost
    http_access allow lan

    does not work in squid 2.6. or 3

  10. #10
    Linux User cyberinstru's Avatar
    Join Date
    Jan 2007
    Location
    India
    Posts
    362
    do u have the following directive set?

    http_port 80 transparent
    Without 'transparent', you squid ain't transparent.
    ---------------------------------
    Registered Linux User #440311
    HI2ARUN _AT_ GMAIL _DOT_ COM
    ---------------------------------

Posting Permissions

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