Find the answer to your Linux question:
Results 1 to 8 of 8
Hi, I configured squid proxy server.i need to access the particular site when i stop the squid service. what rule i have to put in IPtables....
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2012
    Posts
    9

    With out using squid need to access the site by Ptables


    Hi,

    I configured squid proxy server.i need to access the particular site when i stop the squid service. what rule i have to put in IPtables.

  2. #2
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    IPTABLES is unaware of what is running on your system and what is not. Sounds like you setup your rules to point all traffic to the proxy so you will need to do one of 2 things;

    1. remove all the rules that point to the proxy
    2. add a rule about the proxy rules to allow the site you need to access to bypass the proxy.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  3. #3
    Just Joined!
    Join Date
    Oct 2012
    Posts
    9
    kindly send the NAT rule for that

  4. #4
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    Without knowing what rules you already have setup it isn't possible to give you the correct rule.
    Here is a link to a TUTORIAL that you can read up on.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  5. #5
    Just Joined!
    Join Date
    Oct 2012
    Posts
    9
    hi lazy,

    I am using the squid and firewall in the same server.. I tried this below rule but its not working..

    -A POSTROUTING -o eth1 -p tcp -s 0/0 --sport 80 -d 202.54.31.8 --dport 80 -j SNAT --to-source 164.100.142.242

  6. #6
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    As I stated earlier if you stop the proxy you are going to have to remove the rules that point to the proxy.
    The rule you have above isn't going to help because port 80 traffic is already going to the proxy by another rule.

    What is the rule that routes all port 80 traffic to the proxy?

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

  7. #7
    Just Joined!
    Join Date
    Oct 2012
    Posts
    9
    Hi Lazy,

    Actually my required is bypass the particular Intranet site for all my clients through IPtables.
    I already put some rules in IPtables for squid proxy,

  8. #8
    Linux Guru Lazydog's Avatar
    Join Date
    Jun 2004
    Location
    The Keystone State
    Posts
    2,677
    If you require some sites to not go through the proxy then you just need to add the rules for them above the rules for the proxy.
    IPTALES reads all the rules top down. first rule that matches is executed.

    Regards
    Robert

    Linux
    The adventure of a life time.

    Linux User #296285
    Get Counted

Posting Permissions

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