Instructions for a novice: How to setup a proxy

Discussion in 'Help Iran Online' started by WeAreTogether, Jun 22, 2009.

  1. WeAreTogether Member

    While there is a lot of information on this, none of it seems to be geared towards a novice. I setup this page to help people understand what a proxy is and how to set one up.

    Most of the config work was done and posted on Austin Heaps blog, but again it was scattered in various posts and comments and difficult for a novice to sort out. I hope this is easy and straight forward.

    Proxies: How you can help Iran : SOLIDARITY

    (I tried to copy and paste it into here but it loses all it's formatting, and when I paste the html it doesn't parse properly)

    It's a squid install, and here is the config file being used. It only allows connections from Iran, blocks access to your network and blocks known government IPs. If anyone has any suggestions, let me know.
  2. What does an error of "Unexpected data from proxy." mean when testing on proxyheap?
  3. I used the instructions at austin heap, replaced my squid.conf with theirs and get the following error

    FATAL: Bungled squid.conf line 110: http_port 28910 # Heretic II
    Squid Cache (Version 2.7.STABLE3): Terminated abnormally.

    kernel 2.6.28-11-server

    any help would be appreciated.
  4. Ezhdeha Member

    how do you know if your proxy is in use? Is there a program that just shows if the squid server is in use or not?
  5. If you've opened that port, just delete the "# Heretic II" part of the line. That worked for me. But I still get the "Unexpected data from proxy." error as stated above.
  6. WeAreTogether Member

    Yeah I think the # Comments after the port number cause issues. The file I have in the download in my link has them removed, you can manually remove them in your file and it should be fine.
  7. WeAreTogether Member

    Well, unless you turn logging on (which we don't want to do), no. You could try netstat in command prompt.
  8. Ezhdeha Member

    Ok thanks completely understand no logging
  9. Need help with 4 digit port

    Using download from Proxies: How you can help Iran : SOLIDARITY
    Got stuck on "After the fourth line there is a list of ports. Its important we dont all use the same ones as that will make it easier for the Iranian government to block them all. Just pick some random 4 digit number combination. I try to stick with things that will be easy to remember in case someone is trying to memorize it."

    There is a list of 23 lines with http_port XXXX. Am I to dlete these and put in my own 4 digit #? Or change these - don't understand. (I'm really not good at this but would like to help.
  10. squid.conf that will work on mac OS X

    the squid.conf file going around has syntax errors, or simply will not parse properly on a mac (i can't confirm for other platforms).

    here is one that will work. remember to add your visible_hostname on line 104. and if you are using behind a firewall and/or NAT that you have port forwarding and a port open that corresponds to at least one of the http_port numbers from line 112 (or add a different number).

    then don't forget to test it, then submit it at proxyheap (proxy checker) a project for iran
  11. WeAreTogether Member

    I will try to reword this in a less confusing manner. What I mean is that I have a list of ports, each one being declared in the following manner:

    http_port XXXX

    It would be best if you replaced each of the XXXX's with your own numbers. So if I have:

    http_port 9090

    You could change it slightly to

    http_port 9191

    Why? Well think of each one of these ports as a door that people inside iran can use. If we all use the same number, that particular door could be closed for them, and they will no longer be able to access it. I hope this is more clear.
  12. WeAreTogether Member

    Yes the config I have on the site linked in the original post parses fine but the one Austin has listed does not (Perhaps he did it on purposes to force people to change the listed ports).
  13. Thanks but now have error doing command prompt

    Microsoft Windows XP [Version 5.1.2600]
    (C) Copyright 1985-2001 Microsoft Corp.

    C:\>squid\sbin\squid -D -z
    2009/06/23 12:22:47| parseConfigFile: squid.conf:1 unrecognized: '#'
    FATAL: cache_dir c:/squid/var/cache: (2) No such file or directory
    Squid Cache (Version 2.7.STABLE6): Terminated abnormally.
    CPU Usage: 0.031 seconds = 0.016 user + 0.016 sys
    Maximum Resident Size: 2016 KB
    Page faults with physical i/o: 530

    abnormal program termination

  14. WeAreTogether Member

    You need to either find the line "cache_dir" in your config file and change it to none or remove it, or you need to create the folder cache in your squid/var directory.

    It looks like a lot of people are having config issues, I can upload the modified config file I have in my version of the squid download somewhere so it's easier to setup.
  15. WeAreTogether Member

    The only 2 things you need to do with this config file are 1) add your ip after visible_hostname 2) change the ports around so we're not all using the same ones.

  16. Ignore previous post (duh?) Did test ?

    Did test, rcv'd "Fatal error: couldn't connect to host."

    This is what I got when typed in command prompt:

    C:\>c:\squid\sbin\squid -D -z
    2009/06/23 12:27:15| parseConfigFile: squid.conf:1 unrecognized: '#'
    2009/06/23 12:27:15| Creating Swap Directories

    C:\>c:\squid\sbin\squid -i
    Registry stored HKLM\SOFTWARE\GNU\Squid\2.6\Squid\ConfigFile value c:/squid/etc/
    Squid Cache version 2.7.STABLE6 for i686-pc-winnt
    installed successfully as Squid Windows System Service.
    To run, start it from the Services Applet of Control Panel.
    Don't forget to edit squid.conf before starting it.


    Do I need "To run, start it from the Services Applet of Control Panel.
    Don't forget to edit squid.conf before starting it." ???
  17. WeAreTogether Member

    It should be running automatically. Did you use the config file I posted and did you make sure you entered your IP in there? Your IP doesn't start with does it? If it does then that's the problem, you've entered your internal network address.

    If all of that stuff is correct then it's probably a portforwarding problem and you're behind a router / firewall. You basically need to go into your routers config menu and forward each of the ports that you have setup in the config file. There's a link on the site I posted on how to do that or just google "port forwarding". You should be able to find your router model and get a step by step guide.

    Finally, when you are checking on proxyhead, make sure you enter in this format:


    And make sure the port is one of the ones you specified in your config file. Let me know if any of that helps.
  18. Still Problem

    Yes, I followed your instructions. Went to C:\squid\etc\squid.conf, and entered my IP Address and changed all the http_port numbers, they are still all 4 digits. I checked my port and entered it in the config file. It does NOT start with, so I have an external IP address. I don't have a router (I have a Scientific Atlanta Webstar DPC2100R2 - looked it up and it not a router, just a broadband modem) I don't think I have a firewall? I have AVG antivirus, and windows defender, and super antispyware, which I've closed but with no result. I checked several of the ports numbers I put in the config file. I also ran "ipconfig" and got :

    Ethernet adapter Local Area Connection
    IP Address...................: XX.XXX.XXX.XX (note: same as one I entered in the config file and displayed to me by your link)
    Subnet Mask................: XXX.XXX.XXX.X
    Default Gateway...........: XX.XXX.XXX.X (note: first five digits are same and those in the IP Address)

    I did have to start Squid in Services, it didn't run automatically. It's now set to start automatically. Log on is set to Local System Account, nothing else checked, Hardware Profile 1 is enabled.

    Should I give up?

    Thanks for your hard work on this! Sorry I'm not getting this. Seemed easy.
  19. Never Mind! Now Working!

  20. Is anyone out there using rbox?
  21. WeAreTogether Member

  22. Did not receive email confirmation

    Sent info to proxyheap.austin heap last night, but haven't reeived email confirmation?

    Also, do I send just one or for each of the 23 port numbers?

    Just a note, I use Outlook 2003 and my email stopped working. I had to go into control panel and check the SSL boxes for my email to work. (????? - don't know why this happened?)
  23. IMT Member

    I'm using a computer with Windows XP on it and this worked for me (Should work for Vista as well):
    I followed the instructions here:
    Cross sections of a wandering mind: Proxies for Iran: A walkthrough
    Then in my squid.conf after line
    http_port 3128
    I added several more ports like
    http_port 9876
    http_port 5432
    The port numbers you add here are the ones you test at
    proxyheap (proxy checker) a project for iran
    and the ones you enter when you submit your proxy.

    Then I added
    acl TRUSTED src
    acl TRUSTED src
    after line
    acl TRUSTED src

    This allowed me to use proxyheap (proxy checker) a project for iran to check that my proxy was working and submit it for use.

    Also, if your Windows Firewall is on you will need to add squid.exe to your exceptions list.
    Go to your 'Network Connections' and under 'Network Tasks' on the left is a link called 'Change Windows Firewall settings' that will take where you need to go to add it.
  24. JMK50 Member


    Still no email from Proxyheap nor answer to previous post?

    Also noticed IMT's post about setting an exception. I'm running XP and my connection only seemed to work when I turn off my firewall completely (scary). I do not have an option of "Network Tasks" only 1394 connection and LAN. When I go into each one and turn on my Firewall, I have Tor checked and added squid.exe as exceptions. But then Proxy heap states connection failed.

    I don't think anything I've done has helped set up a proxy connection. I'm also not comfortable leaving my Firewall off completely.

    Might need Geek Squad or something?
  25. IMT Member

    Re: Help
    Shows a typical Network Connections window. Network Tasks is to the left of the connections.

    However, going through the properties of the connections should be just as good and you shouldn't need to turn off your firewall completely to get it to work.

    Have you tested several different ports that you opened in your squid.conf through proxyheap (proxy checker) a project for iran
    Some ports just won't work even if your proxy is working.

    As a last resort I suggest deleting your current install of squid and starting over following the method I used in my post above. You will get an error message after you type in c:\squid\sbin\squid -i but that's only because it has already been installed as a service.
  26. JMK50 Member

    Sorry, but I give up

    I did everything meticulously, and lost my entire internet connection. I did want to help, but I think is just too complex for me. Thanks for the help, though.

Share This Page

Customize Theme Colors


Choose a color via Color picker or click the predefined style names!

Primary Color :

Secondary Color :
Predefined Skins