1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Install Squid proxies easily with my scripts!

Discussion in 'Freebies / Giveaways' started by fatboy, Oct 31, 2014.

  1. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Ok - its been a few days of should I, shouldn't I and after tweaking the scripts a little I have decided to let these out for anyone to use. If you have a VPS or dedi server with several IP addresses, this script will set them all up to be used as elite proxies. I don't have problems with individuals using this for themselves, but if you are a business selling proxies and you use these scripts, please dig deep and buy me a beer. Saying that, I won't know so if you don't want to I won't be able to track you down - let your conscience be your guide ;)

    So if you have a VPS with 5 IP addresses, within minutes you will have 5 authenticated elite proxies to use with only one command and giving a username and password to use for authentication.

    However, I will warn you that these are in a beta stage and I will take no responsibility if your server gets broken. I have tested them on a few different VPSes and a few Linux distros and they all seem to work fine, well I now how about 15 proxies to play with so something worked :)

    What you will need to have in place:
    • Root access to the VPS / dedi server
    • Wget installed
    • At least a single IP4 IP address on the box (IPv6 is not supported.)

    You will also need to be running one of these Linux distros for the scripts to use. If there is enough take up I can probably try to add more distros to the scripts:
    • Debian 7 64 bit
    • Centos 7 64 bit
    • Centos 6 64 bit

    All you need to do is run the command below, the script will then detect what distro you have and then grab the needed files for your specific distro.
    No personal info is passed back to my servers apart from your IP address and what files you need.

    To run the setup scripts log in via SSH and type:
    Code:
    cd /usr/src && wget http://autoim.net/squidmaker/install.sh && bash install.sh
    
    If you have any problems, feel free to give me a shout but please remember my disclaimer above, I am not responsible for knackering anything!
    My BASH scripting isn't my strongest point so if you look through the scripts don't bother trying to call me out, the scripts do what they should do, I am happy :)

    Enjoy,
    FB
     
    • Thanks Thanks x 3
    Last edited: Oct 31, 2014
  2. hajro

    hajro Junior Member

    Joined:
    Oct 4, 2014
    Messages:
    164
    Likes Received:
    43
    Tried proxy and not working
     
    • Thanks Thanks x 1
  3. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    This is a new one on me that I didn't see when testing: "Error: rpmdb open failed"
    Let me check that one out!


    *EDIT* If you log into the VPS and run yum update, does it update or do you get an error?
     
  4. hajro

    hajro Junior Member

    Joined:
    Oct 4, 2014
    Messages:
    164
    Likes Received:
    43
    I completed update, but still same as previous post.
     
    Last edited: Oct 31, 2014
  5. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Theres the problem then - seems something is broken on your VPS :)
    The only installs I can see happening from the server logs are centos 6 64 bits ones, so I spun up a digital ocean droplet with centos 6/64 and its installed fine for me.
     
  6. hajro

    hajro Junior Member

    Joined:
    Oct 4, 2014
    Messages:
    164
    Likes Received:
    43
    Yeah I had to rebuild ddb and it works
    Thanks


     
    • Thanks Thanks x 1
  7. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Cool glad that was sorted - I see your hostname includes Droplet so I am guessing you are using DO as well? Can I ask what location you were using to get the error in the first place.
     
  8. hajro

    hajro Junior Member

    Joined:
    Oct 4, 2014
    Messages:
    164
    Likes Received:
    43
    How you mean location? My server is New York 2 on DO.
     
    • Thanks Thanks x 1
  9. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Thats what I was after thanks, will go spin one up in NY2 to see if it was a one off or they have template issues incase anyone gets the same problem.
     
  10. tarekhamditn

    tarekhamditn Newbie

    Joined:
    Jan 15, 2015
    Messages:
    0
    Likes Received:
    0
    iptables




    # Generated by iptables-save v1.4.21 on Tue Jan 13 13:50:04 2015
    *nat
    :pREROUTING ACCEPT [231:26586]
    :INPUT ACCEPT [5:1028]
    :OUTPUT ACCEPT [1:76]
    :pOSTROUTING ACCEPT [0:0]
    -A POSTROUTING -o enp3s0 -j MASQUERADE
    COMMIT
    # Completed on Tue Jan 13 13:50:04 2015
    # Generated by iptables-save v1.4.21 on Tue Jan 13 13:50:04 2015
    *mangle
    :pREROUTING ACCEPT [167934:202214900]
    :INPUT ACCEPT [156200:201105987]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [85367:4771125]
    :pOSTROUTING ACCEPT [85392:4775818]
    :FORWARD_direct - [0:0]
    :INPUT_direct - [0:0]
    :OUTPUT_direct - [0:0]
    :pOSTROUTING_direct - [0:0]
    :pREROUTING_ZONES - [0:0]
    :pREROUTING_ZONES_SOURCE - [0:0]
    :pREROUTING_direct - [0:0]
    :pRE_public - [0:0]
    :pRE_public_allow - [0:0]
    :pRE_public_deny - [0:0]
    :pRE_public_log - [0:0]
    -A PREROUTING -j PREROUTING_direct
    -A PREROUTING -j PREROUTING_ZONES_SOURCE
    -A PREROUTING -j PREROUTING_ZONES
    -A INPUT -j INPUT_direct
    -A FORWARD -j FORWARD_direct
    -A OUTPUT -j OUTPUT_direct
    -A POSTROUTING -j POSTROUTING_direct
    -A PREROUTING_ZONES -i enp3s0 -g PRE_public
    -A PREROUTING_ZONES -i enp4s0 -g PRE_public
    -A PREROUTING_ZONES -g PRE_public
    -A PRE_public -j PRE_public_log
    -A PRE_public -j PRE_public_deny
    -A PRE_public -j PRE_public_allow
    COMMIT
    # Completed on Tue Jan 13 13:50:04 2015
    # Generated by iptables-save v1.4.21 on Tue Jan 13 13:50:04 2015
    *security
    :INPUT ACCEPT [150995:200631109]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [85372:4771959]
    :FORWARD_direct - [0:0]
    :INPUT_direct - [0:0]
    :OUTPUT_direct - [0:0]
    -A INPUT -j INPUT_direct
    -A FORWARD -j FORWARD_direct
    -A OUTPUT -j OUTPUT_direct
    COMMIT
    # Completed on Tue Jan 13 13:50:04 2015
    # Generated by iptables-save v1.4.21 on Tue Jan 13 13:50:04 2015
    *raw
    :pREROUTING ACCEPT [167950:202216400]
    :OUTPUT ACCEPT [85372:4771959]
    :OUTPUT_direct - [0:0]
    :pREROUTING_direct - [0:0]
    -A PREROUTING -j PREROUTING_direct
    -A OUTPUT -j OUTPUT_direct
    COMMIT
    # Completed on Tue Jan 13 13:50:04 2015
    # Generated by iptables-save v1.4.21 on Tue Jan 13 13:50:04 2015
    *filter
    :INPUT ACCEPT [158:14455]
    :FORWARD ACCEPT [0:0]
    :OUTPUT ACCEPT [2:152]
    -A FORWARD -i enp4s0 -j ACCEPT
    COMMIT
    # Completed on Tue Jan 13 13:50:04 2015






    local network connection error has internet







    error squid Cache initializé


    Index du module
    Cache initializé


    Arrêt de Squid ...
    .. Fait


    Initialisation du cache de Squid à l'aide de la commande squid -f /etc/squid/squid.conf -z ..


    2015/01/15 11:15:32| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
    2015/01/15 11:15:32| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
    2015/01/15 11:15:32| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
    2015/01/15 11:15:32| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
    2015/01/15 11:15:32| WARNING: (B) '127.0.0.0/8' is a subnetwork of (A) '127.0.0.0/8'
    2015/01/15 11:15:32| WARNING: because of this '127.0.0.0/8' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32| WARNING: You should probably remove '127.0.0.0/8' from the ACL named 'to_localhost'
    2015/01/15 11:15:32| WARNING: (B) '0.0.0.0' is a subnetwork of (A) '0.0.0.0'
    2015/01/15 11:15:32| WARNING: because of this '0.0.0.0' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32| WARNING: You should probably remove '0.0.0.0' from the ACL named 'to_localhost'
    2015/01/15 11:15:32| WARNING: (B) '0.0.0.0' is a subnetwork of (A) '0.0.0.0'
    2015/01/15 11:15:32| WARNING: because of this '0.0.0.0' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32| WARNING: You should probably remove '0.0.0.0' from the ACL named 'to_localhost'
    2015/01/15 11:15:32 kid1| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
    2015/01/15 11:15:32 kid1| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32 kid1| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
    2015/01/15 11:15:32 kid1| WARNING: (B) '127.0.0.1' is a subnetwork of (A) '127.0.0.1'
    2015/01/15 11:15:32 kid1| WARNING: because of this '127.0.0.1' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32 kid1| WARNING: You should probably remove '127.0.0.1' from the ACL named 'localhost'
    2015/01/15 11:15:32 kid1| WARNING: (B) '127.0.0.0/8' is a subnetwork of (A) '127.0.0.0/8'
    2015/01/15 11:15:32 kid1| WARNING: because of this '127.0.0.0/8' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32 kid1| WARNING: You should probably remove '127.0.0.0/8' from the ACL named 'to_localhost'
    2015/01/15 11:15:32 kid1| WARNING: (B) '0.0.0.0' is a subnetwork of (A) '0.0.0.0'
    2015/01/15 11:15:32 kid1| WARNING: because of this '0.0.0.0' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32 kid1| WARNING: You should probably remove '0.0.0.0' from the ACL named 'to_localhost'
    2015/01/15 11:15:32 kid1| WARNING: (B) '0.0.0.0' is a subnetwork of (A) '0.0.0.0'
    2015/01/15 11:15:32 kid1| WARNING: because of this '0.0.0.0' is ignored to keep splay tree searching predictable
    2015/01/15 11:15:32 kid1| WARNING: You should probably remove '0.0.0.0' from the ACL named 'to_localhost'
    2015/01/15 11:15:32 kid1| Creating missing swap directories
    2015/01/15 11:15:32 kid1| No cache_dir stores are configured.


    <- Retourner à index de squid


    thank you to answer me email
     
    Last edited: Jan 15, 2015
  11. rovad

    rovad Junior Member

    Joined:
    Dec 27, 2009
    Messages:
    197
    Likes Received:
    65
    Holy shit this saved my sanity! If I had anything on either of my accounts I'd drop a donation, sadly I spent/withdrew everything already.

    What happens if you take your website down?
     
    • Thanks Thanks x 1
  12. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    If the site goes down nothing will happen to your proxies, you just won't be able to install more using the scripts.

    Glad you found it useful though :)
     
    • Thanks Thanks x 1
    Last edited: May 17, 2015
  13. rovad

    rovad Junior Member

    Joined:
    Dec 27, 2009
    Messages:
    197
    Likes Received:
    65
    I downloaded the .sh and .tar files for Centos 6 64 bit. will it work if I upload to my own server and then just change the URL in the .sh to point onto my own domain?
     
  14. fatboy

    fatboy Elite Member

    Joined:
    Aug 13, 2008
    Messages:
    1,618
    Likes Received:
    3,227
    Occupation:
    Retired
    Location:
    Old Peoples Home
    Yup - if you want all of the files for Debian then shout and I can make them available, just give credit if asked how you did it ;)
     
  15. rovad

    rovad Junior Member

    Joined:
    Dec 27, 2009
    Messages:
    197
    Likes Received:
    65
    It's just for future-proofing this little gem. I have no intentions to make it look like I did it myself or sell or anything like that.