MEWBIES@:  Facebook  Twitter  G+  YouTube  DeviantArt  Forum  Wall
 SHARE:
    ▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
   ██                                                                       ██
  █▌                   -   HTTPTUNNEL - HTS & HTC   -                        █▌
 █▌                                                                           █▌
 █                                                                            ▐▌
 █ This is a great program to bypass firewalls using the HTTP protocol.       ▐▌
 █ httptunnel site is HERE. Read their FAQ HERE. For the Windows' Client read ▐▌
 █ HERE. This is very easy once you have the correct syntax - Huge Thank you  ▐▌
 █ to xzibition.com HERE for their generous help. Btw if you need a good      ▐▌
 █ host; they are it.                                                         ▐▌
 █                                                                            ▐▌
 █ SETTING UP SERVER SIDE HTS LINUX:                                          ▐▌
 █ `````````````````````````````````                                          ▐▌
 █ Server is the host who will setup and operate the tunnel for               ▐▌
 █ users/clients.                                                             ▐▌
 █                                                                            ▐▌
 █ su                                                                         ▐▌
 █ aptitude install httptunnel                                                ▐▌
 █                                                                            ▐▌
 █ To view hts (httptunnel server) help:                                      ▐▌
 █ man hts                                                                    ▐▌
 █ (to scroll in a man window use enter key, to leave: q)                     ▐▌
 █ or                                                                         ▐▌
 █ hts -h                                                                     ▐▌
 █ To view htc (httptunnel client) help:                                      ▐▌
 █ man htc                                                                    ▐▌
 █ or                                                                         ▐▌
 █ htc -h                                                                     ▐▌
 █                                                                            ▐▌
 █ For example your client can use port 8383, check if you have it open by    ▐▌
 █ doing:                                                                     ▐▌
 █ netstat -ntlp | grep ':8383'                                               ▐▌
 █ If there is no reply then it's free to use (you might need to open /       ▐▌
 █ forward that in your firewall though).                                     ▐▌
 █ To view all ports being used:                                              ▐▌
 █ netstat -antp                                                              ▐▌
 █                                                                            ▐▌
 █ To start hts:                                                              ▐▌
 █ hts -F YOUR.IP:YOUR.SSH.PORT YOUR.IP:PORT.CLIENT.WILL.FORWARD.FROM         ▐▌
 █ For example:                                                               ▐▌
 █ hts -F 74.125.45.100:22 74.125.45.100:8383                                 ▐▌
 █ Or to start it with a pid file to a location:                              ▐▌
 █ hts -p /var/run/hts.pid -F 74.125.45.100:22 74.125.45.100:8383             ▐▌
 █ It will listen for incoming on port 8383 (from your client) and then       ▐▌
 █ forward the connection to port 22.                                         ▐▌
 █ exit                                                                       ▐▌
 █                                                                            ▐▌
 █ To stop a running a hts - find its process:                                ▐▌
 █ ps -A                                                                      ▐▌
 █ find reply in list something like this: 19383 ?  00:00:00 hts              ▐▌
 █ If it is running to stop it:                                               ▐▌
 █ killall -HUP hts                                                           ▐▌
 █ or                                                                         ▐▌
 █ kill -HUP [PID of hts] which in my reply above PID would be:               ▐▌
 █ kill -HUP 19383                                                            ▐▌
 █                                                                            ▐▌
 █ NOTES:                                                                     ▐▌
 █ 1. You might not need the double IP in the cmd but that is how I got it to ▐▌
 █ work on my Debian. You could try it without like this:                     ▐▌
 █ hts -F 74.125.45.100:22 8383                                               ▐▌
 █                                                                            ▐▌
 █ 2. Port 8383 needs to be a port that the client is able to use from his    ▐▌
 █ box or it won't work for the client.                                       ▐▌
 █ It also needs to be a free port on your box capable of using.              ▐▌
 █ If for example client can only use port 80 and you have apache on that     ▐▌
 █ port you either have to shut down apache or move it to another port. So if ▐▌
 █ you can get a list of all ports your client can use this will solve some   ▐▌
 █ trial and errors.                                                          ▐▌
 █                                                                            ▐▌
 █ 3. Only one IP/one client may use this at the same time per port.          ▐▌
 █                                                                            ▐▌
 █ 4. HERE is a good article explaining how to bypass firewalls and another   ▐▌
 █ one HERE from htc's README.                                                ▐▌
 █                                                                            ▐▌
 █ HTS VARIABLES:                                                             ▐▌
 █ ``````````````                                                             ▐▌
 █ Usage: hts [OPTION]... [PORT]                                              ▐▌
 █ Listen for incoming httptunnel connections at PORT (default port is 8888). ▐▌
 █ When a connection is made, I/O is redirected to the destination specified  ▐▌
 █ by the --device, --forward-port or --stdin-stdout switch.                  ▐▌
 █                                                                            ▐▌
 █   -c, --content-length BYTES     use HTTP PUT requests of BYTES size       ▐▌
 █                                  (k, M, and G postfixes recognized)        ▐▌
 █   -d, --device DEVICE            use DEVICE for input and output           ▐▌
 █   -F, --forward-port HOST:PORT   connect to PORT at HOST and use it for    ▐▌
 █                                  input and output                          ▐▌
 █   -h, --help                     display this help and exit                ▐▌
 █   -k, --keep-alive SECONDS       send keepalive bytes every SECONDS        ▐▌
 █ seconds                                                                    ▐▌
 █                                  (default is 5)                            ▐▌
 █   -M, --max-connection-age SEC   maximum time a connection will stay       ▐▌
 █                                  open is SEC seconds (default is 300)      ▐▌
 █   -s, --stdin-stdout             use stdin/stdout for communication        ▐▌
 █                                  (implies --no-daemon)                     ▐▌
 █   -S, --strict-content-length    always write Content-Length bytes in      ▐▌
 █ requests                                                                   ▐▌
 █   -V, --version                  output version information and exit       ▐▌
 █   -w, --no-daemon                don't fork into the background            ▐▌
 █   -p, --pid-file LOCATION        write a PID file to LOCATION              ▐▌
 █                                                                            ▐▌
 █                                                                            ▐▌
 █ SETTING UP CLIENT SIDE HTC WINDOWS:                                        ▐▌
 █ ```````````````````````````````````                                        ▐▌
 █ Client is the person who is going to use the httptunnel to bypass their    ▐▌
 █ firewall.                                                                  ▐▌
 █ 1. Check their site for the latest version if your host didn't give you.   ▐▌
 █ Download httptunnel-3.3w32r2.zip HERE.                                     ▐▌
 █                                                                            ▐▌
 █ 2. Unzip that to: C:\htc                                                   ▐▌
 █                                                                            ▐▌
 █ 3. Find an open port that you know you can use 'source port/listening      ▐▌
 █ port', or forward one in your router.                                      ▐▌
 █ You can get a free little tool to check if your ports are open / forwarded ▐▌
 █ correctly 'PFPortChecker' by portforward.com HERE (not required).          ▐▌
 █                                                                            ▐▌
 █ 4. Open a Window's Prompt: Start/Run/ type in: cmd                         ▐▌
 █ then select OK                                                             ▐▌
 █                                                                            ▐▌
 █ 5. Type into the window then hit your enter key:                           ▐▌
 █ C:\htc\htc.exe HostIP:HostPort -F another.source.port                      ▐▌
 █ For example: C:\htc\htc.exe 74.125.45.100:80 -F 8383                       ▐▌
 █ If you have to connect to a corporate proxy first before being allowed out ▐▌
 █ then do this for example:                                                  ▐▌
 █ C:\htc\htc.exe -P HttpProxy:3128 74.125.45.100:80 -F 8383                  ▐▌
 █ If your proxy requires authentication then for example:                    ▐▌
 █ C:\htc\htc.exe -P HttpProxy:3128 -A USER:PASSWORD 74.125.45.100:80 -F 8383 ▐▌
 █                                                                            ▐▌
 █ 6. Leave that window open, just minimize it.                               ▐▌
 █                                                                            ▐▌
 █ PUTTY SETTINGS FOR USE WITH HTC:                                           ▐▌
 █ ````````````````````````````````                                           ▐▌
 █ 1. Do the same settings as above for Putty 'except' for "Session/ enter    ▐▌
 █ proxy's IP into the hostname & port" you'll enter:                         ▐▌
 █ 127.0.0.1 (or: localhost) port 8383 (your other source port).              ▐▌
 █ 2. Connect to your proxy, leave window open, just minimize it. (So now you ▐▌
 █ will have HTC and PuTTy running)                                           ▐▌
 █                                                                            ▐▌
 █ TO USE PROXY IN APPLICATIONS:                                              ▐▌
 █ `````````````````````````````                                              ▐▌
 █ Follow the same directions as above - 'TO USE PROXY IN APPLICATIONS'.      ▐▌
 █                                                                            ▐▌
 █ SUMMARY OF PORTS USED IN THE EXAMPLES ABOVE:                               ▐▌
 █ ````````````````````````````````````````````                               ▐▌
 █ Your own source port in your applications (IE, mIRC, etc): 8282            ▐▌
 █ Your own same source port (Dynamic) in PuTTy that will listen for your applications: 8282
 █ Your own source port Putty will connect to HTC: 8383                       ▐▌
 █ Your own same source port HTC is listening on for PuTTy: 8383              ▐▌
 █ Your Host/Server port that HTC will send off your connections: 80          ▐▌
 █                                                                            ▐▌
 █ So your the connections will go something like this:                       ▐▌
 █ Applications connect to your own box (localhost) on port 8282, PuTTy hears ▐▌
 █ them (listening/source port 8282) and sends that connection off / forwards ▐▌
 █ it to port 8383, HTC hears them and forwards it to the Server (finally out ▐▌
 █ of your box) on Port 80, which all firewalls allow.                        ▐▌
 █                                                                            ▐▌
 █ HTC VARIABLES:                                                             ▐▌
 █ ``````````````                                                             ▐▌
 █ -A, --proxy-authorization USER:PASSWORD  proxy authorization               ▐▌
 █ -z, --proxy-authorization-file FILE      proxy authorization file          ▐▌
 █ -B, --proxy-buffer-size BYTES  assume a proxy buffer size of BYTES bytes   ▐▌
 █                                (k, M, and G postfixes recognized)          ▐▌
 █ -c, --content-length BYTES     use HTTP PUT requests of BYTES size         ▐▌
 █                                (k, M, and G postfixes recognized)          ▐▌
 █ -d, --device DEVICE            use DEVICE for input and output             ▐▌
 █ -F, --forward-port PORT        use TCP port PORT for input and output      ▐▌
 █ -h, --help                     display this help and exit                  ▐▌
 █ -k, --keep-alive SECONDS       send keepalive bytes every SECONDS seconds  ▐▌
 █                                (default is 5)                              ▐▌
 █ -M, --max-connection-age SEC   maximum time a connection will stay         ▐▌
 █                                open is SEC seconds (default is 300)        ▐▌
 █ -P, --proxy HOSTNAME[:PORT]    use a HTTP proxy (default port is 8080)     ▐▌
 █                                                                            ▐▌
 █ HTC NOTES:                                                                 ▐▌
 █ ``````````                                                                 ▐▌
 █ 1. Make sure all the ports that you select are open for you to use or this ▐▌
 █ won't work.                                                                ▐▌
 █                                                                            ▐▌
 █ 2. Only one IP / one person may use this at the same time per port. It's   ▐▌
 █ the software limitation, not your host.                                    ▐▌
 █                                                                            ▐▌
 █ 3. To close HTC completely you need to use the Task Manager: Ctrl+Alt+Del  ▐▌
 █ keys, Processes tab, find htc.exe, select it, hit the 'End Process' button.▐▌
 █                                                                            ▐▌
 █ 4. If when you try to connect with putty and it immediately prompts you    ▐▌
 █ with: "Server unexpectedly closed network connection" and then probably    ▐▌
 █ kills the running hts.exe - most likely the cmd you are entering is        ▐▌
 █ incorrect and or your ports aren't open. Most cases this has nothing to do ▐▌
 █ with your host.                                                            ▐▌
 █                                                                            ▐▌
 █ 5. In the enclosed README it suggests to read an article about firewall    ▐▌
 █ piercing that the link is now dead; that document can now be found HERE.   ▐▌
 █                                                                            ▐▌
 █ 6. It will log to Window's application log. To view those logs:            ▐▌
 █ Windows XP:                                                                ▐▌
 █ Window's Start button/Settings/Control Panel/ double click on              ▐▌
 █ 'Administrative Tools' / double click on 'Event Viewer' / double click on  ▐▌
 █ 'Application'                                                              ▐▌
 █                                                                            ▐▌
 █ Windows Vista & 7:                                                         ▐▌
 █ Window's Start button/Control Panel/System and Security/Administrative     ▐▌
 █ Tools' sub menu View event logs/Windows Logs/Application                   ▐▌
 █                                                                            ▐▌
 █ Easy way to find entries for an application is to click the column's tab   ▐▌
 █ 'Source' which will then sort all alphabetically.  It will be under putty  ▐▌
 █ if there is one.                                                           ▐▌
 █                                                                            ▐▌
 █ To remove an entry, select it, then on the Menu- File/Options/ Press the   ▐▌
 █ Delete Files button - careful; I have not done this step to know the       ▐▌
 █ results.                                                                   ▐▌
 █                                                                            ▐▌ 
 █ //----------------------------------------------------------------------   ▐▌
 █                                                                            ▐▌
 █ If you find mistakes, have suggestions, and or questions please post at    ▐▌
 █ mewbies forum HERE - thank you.                                            ▐▌
 █                                                                            ▐▌
 █ Last update on 14 May '10                                                  ▐▌
 █                                                                            ▐▌
 █▌                                                                           █▌
  █▌                          -   mewbies.com   -                            █▌
   █▌                                                                       █▌
    ██▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄██