SSH Proxy/Port access

Here’s a quick guide on how to setup a secure SSH based encrypted proxy. I use this to browse when I want to get to work restricted sites, and when on a ‘free’ WiFi connection, as nothing is protected on them.

This is all Windows based, but you could quiet happily take the concepts and apply it to your OS of choice.

What we need

  • A PC connected to the net that’s either on permanently, or has wake on lan (and a router that supports wake on net), I’ll assume that it’s on permanently for now and leave you to configure your WOL
  • An SSH server, for Windows we will be using WinSSHD by Bitvise as it’s free for personal use, and easy to configure and maintain. For *nix systems you could easily use OpenSSH Server.
  • An SSH Client, again we will be using a Bitvise product (makes life easy) called Tunnelier. However you could use OpenSSH, or any SSH client you like, for example PuTTY
  • A Proxy Server, we will use Squid. (The Windows Build is here). Reason being is it’s easy to get running, supports all OS’s and well documented.
  • A way of having a common permanent name (or IP address), I use No-IP and the client, but fixed IP or any other DNS hoster you fancy.
  • Some patience

Lets get started….

  • Download and unpack Squid to the C Drive (C:\Squid)
  • In there we should have a bunch of folders in there now, looking a little like the image below
    SquidDir
  • Open up the ETC folder, and rename all the files so they all are *.conf (i.e take the .default off the end of the filenames)
  • fire up notepad, and edit the squid.conf file and search (CTRL-F) for the phrase http_access , This should say http_access deny all change this to http_access allow all we are not really worried about the security of your proxy server, as it’s only being accessed by already authenticated clients coming in over ssh. But if you want set the security up however you desire, as long as 127.0.0.1 has full access. (read the section above the change for details)
  • Launch a command window and goto the sbin folder in C:\Squid and type squid –z this will create the swap folders that squid needs to run, then type squid to start the app in interactive mode (to check)
  • Test this is working by setting the local browser to use 127.0.0.1 on port 3128, if you can browse the net then squid is working.
  • If all is good, go back to the command window, press CTRL-C to stop squid, and then type squid –i this will install the squid service, bring up the services control panel (type services.msc and press enter), fine the one called Squid, set it to automatic, and then click the start on it.

Right, Squid installed and running, lets get the SSH stuff working.

  • Install WinSSHD that you downloaded earlier, and set it up. After the install it will go through the easy setup. It will ask you for your setup. Here’s what I have, but upto you.

    - Listening Port – 443
    - UPnP – disabled (I configure router myself, but try UPnP if your router supports it)
    - Open Firewall – Local
    - Allow any windows account – Ticked
    OpenSSHD1

  • Don’t worry about that too much now though, as we will configure it in the advanced config. Bring up the control Panel for the app if not already open, and click the Edit Advanced Settings link
    MainSSHD
  • Goto the Server/Bindings and add some more ports (see image)
    SSHDPorts
    You can obviously tick the Enable UPnP if you like, it may make configuration of your router easier. If not ticked make sure you point the ports to the PC on your Router.
  • Everything else should be good to go. Just make sure the startup type is Automatic

Client….

  • Install the Tunnelier software, and set it up, it’s easy to get the connection going. Use your standard Windows username and password.
  • We need to set some port forwards up now. Goto the C2S Fwding
    PortForwarding
    Add some local port captures. What we are doing here is mapping a local on your Laptop/Remote PC and map it to a port on the Server PC. Above in the image I have the following. Local port 8088 maps to the Remote 3128 for the Squid port. That way if I tell IE to use proxy LocalHost on port 8088 I am actually using Server Port 3128, and hence we get connection to the outside world, from wherever the server is located. the other two are For Terminal Services (RDP) means I can connect to the various machines by issuing the command MSTSC /V:localhost:33891 and connecting via the tunnel to the remote machine.
  • Pop into the SSH tab, and make sure the tick boxes for NONE are not ticked on Encrytion and Compression. You allways want those to be forced.
  • When your happy that it’s working as you want then save the configuration.

Make sure you now have a fixed IP, or a No-IP account setup, and the software installed. Configure the client to connect to that address, and you should be good to go.

The ports I have setup should get you through a lot of things. 443 obviously the ‘Secure Universal hacking port’, however I’ve also got 21 (FTP) and 53 (DNS) in there, DNS specifically because most locked ‘pay for’ WiFi zones allow DNS resolution and traversal.

Any questions just shout in the comments.

Omnia 7 Mango Update

Seems as I’m obviously in the mood to write guides at the moment, let’s do one for getting the Samsung Omnia 7 upto Mango (beta)

QUICK NOTE : AT THE MOMENT HOMEBREW GETS DISABLED, I’m looking into a work around for it by perhaps setting the User Permissions on the registry.  But that must wait till I get back to civilization.

UPDATE 2 : Thanks to Ou Haochuan we now have an unlock for Mango. Please see the UNLOCK notices below. If you have already updated to Mango, plug your phone in, goto Zune and settings/updates and restore your backup. Then continue below where we copy the files to the device.

YHD has writen up the other method using the Diag tools. Have a look Here on XDA-Devs for that.

First off, I’ll just assume your on NoDo (latest update) and have NOT sideloaded your device.

Ok then, first we need to backup everything on your device you want, as we will be zapping it back to fresh, just to make sure.

OK, let’s get what we need first.

  1. Zune Desktop Installed
  2. The Firmware and Mango stuff (Mirror for Firmware and Mango)
  3. Samsung WP7 Tools
  4. Force NoDo (just in case) and NoDo Fix tools
  5. Sideload Unlock Files Here

Ok then, let’s get started

  • Unrar the Firmware and Mango stuff to a folder somewhere.
  • Fire up the vm_web2.exe and that should install the dev environment. It will take a while though, so we can flash the device back to 7004 while we wait.
  • Open the folder that you unpacked the Samsung rar file too, and run the I8700_Samsung_Mobile_USB_Driver_V5.2__V1.2.1050.0.exe file, this will install the drivers required to interface with the phone in Download mode. Power the phone off without a cable plugged in. Now press and hold Volume UP, Camera and press Power. Download mode will now launch.
  • Plug the USB into the PC, and tell the driver popup to skip Windows Update, drivers will be installed.
  • Run the WP7_Downloader_Ver_7.05_for_Retail_Device_(Product_Force_Select_MD5_X).exe file in the Samsung folder, ignore the errors, they are not a problem. In explorer drag the following files to the application
    signed_phone_Cetus_Europe.bin, signed_phone_Cetus_Europe.nb0, signed_phone_Cetus_Europe.eb0 and signed_CSC_Cetus_Europe_I8700XECJJ6.csc
    Untitled
    Make sure you have a COM port named in the Port section, and that it’s green. Press the Start button, and wait for the device to reboot.NOTE : I’ve had issue with the keyboard auto complete/correct not working using the above original firmware, not sure why, but This UK Unbranded ROM seems to be OK. So worth using that instead of the one I’ve said at the top, however worked out the issue and written the work around below (marked UPDATE).
  • Do a quick runthrough to get the device to the main screen, no real configuration needs to be done, but we do need to add an email account, so do that when your in.
  • Email yourself the ChevronWP7.cer file, and when you receive it on the device, download it and install it by clicking on it. Also run the ChevronWP7.Reg file into the PC.
  • OK, so we now have to wait for the install you started earlier to finish. When it does plug the device into your PC and go through the Zune setup (DONT UPDATE, CLICK NOT NOW)
  • Turn Flight mode on on the device, run the ChevronWP7.exe file as an admin, and allow it full rights on the firewall if asked and when it pops up, click both tick boxes and press OK to unlock
    chevronwp7
  • Now click the Windows Start button, then All Apps, then Windows Phone Developer Tools then Application Deployment. Click Browse and find the Samsung Tools.xap file and make sure the screen on the device is unlocked and on, press Deploy.
    deploy
  • Fire up the Samsun Tools on the device, and Click the Remove Sideload Limit, and the Prevent Device From Relocking, click Apply Changes then press the Reboot button.
  • OK, now we need to do the NoDo update, so turn off flight mode, goto settings, about and the Update found should pop up, run through it on Zune and it should reboot your device and install NoDo. (check version number in setting/about if version 7008, then we need to unpack and run the Force NoDo and the Fix NoDo, just close Zune, run the ChevronWP7.Updater.exe, let it finish updating, then run the WPST.exe to make sure we are back on support. I know it’s a pain, but hey, Some Samsung Omnia’s don’t get the update?)
  • Once rebooted out of the update process, make sure to go back into the Samsung Tools and reset the Prevent Device Relock. Update : Also go into setting, Keyboard and set the auto correct back to on! this setting get’s copied over to Mango, but no where to change it in the Mango interface so do it NOW!
  • UNLOCK : Let’s copy the needed files to the device, after unpacking the MangoJailbreak.RAR upload the WP7RootTools.xap to the device.
    RootTools
  • Now put the PC into USB download mode, so disconnect the USB cable and close Zune, and run Wp7UsbStorageEnabler.exe, click the enable button. Then plug the device back into the computer.
    USBEnable
  • Launch windows Explorer (Win+E) and you should see your device listed, copy the Unlock.xml file to here, and then disconnect the device, re-run Wp7UsbStorageEnabler.exe and click Disable.
    Explorer
  • Make sure you have Network Profiler installed, if not install it from the Samsung Zone in marketplace.
  • Launch WP7 Root Tools on the device, goto Explorer, Goto My documents/Zune/Content/????/??? and rename the file in there back to unlock.xml (long hold, rename) then long hold, cut. click the back button till you get to the root of the device again (should have Application Data as top folder) and then go into the Windows folder. Click the clipboard at the bottom to paste the file into  here.
  • Slide across to the registry editor, go to HKLM\System\State\Samsung\Phone\Operator\Base you will see at least one folder in here, click the first one, select Filename and replace the filename with unlock.xml, now select OperatorName and change that to Unlock (so we know which one it is). Press Home and then run the Network Profiler Tool, when you have run it and make sure you have the Unlock option in the list.
  • OK, close Zune, we now need to install the beta version of Zune and the dev stuff. First thing to do is uninstall Zune, so goto Control Panel, Programs and Features, find Zune and uninstall it.
  • Pop into the MangoB2-ZuneClient\Zune for Public Trial and run the StartZuneLocal.exe and run through it. When it’s finished, check the tick box to run the application. Plug the phone in and do the default setup and make sure the phone is connected properly.
  • Now into MangoB2-UpdateWP and run the relevant update (x64 for 64bit, if your not sure, run the x86 one)
  • Now run the MangoB2-DevRetailUpdate.exe from the MangoB2-DevRetailUpdate folder. This will then check your device is unlocked (reg check on device) then download the update, and reboot the phone. This will perform a backup of the device and then flash the Mango rom over.
    update
  • All should be good to go. Just make sure to load up the Samsung tools after it’s rebooted, and select the Prevent device from relocking option, apply, reboot.
  • Launch Zune, you should be asked to update, if not click settings/update and it will force the check. Update and …
    updateinprog
    Then it will reboot, and another update (actual Mango)
    7661
  • UNLOCK : Fire up the Network Profile tool, select the Unlock option. The device should now be Sideload enabled again. However it is worth noting that not all homebrew will still work in Mango due to changes that have been made to the COM runtime.

NOTE : If for some reason this method does not work, there is another method using the Samsung Diagnostic tools, if there is enough demand for that knowledge I’ll detail it. Just leave a comment.

Welcome to Mango

Useful Stuff (Android)

android-logoThought I would knock this together to help those new to the Android world out.

This get’s a little difficult in the Android world because there is the Rooted and Un-Rooted world to think about, and the abilities of the two are different.

Let’s start with the stuff everyone can enjoy first.

Amazon AppStore – Not technically an App, but a useful place to find them. Unfortunately though it’s only available for the US audience. Sort of. Pop over to Paul’s post on Modaco for the international install.

Angry Birds – 3 Versions available now, all fun and while away the time.

BTFon – Worth having if you have a FOn or BTOpenZone account.

BBC iPlayer – iPlayer mobile

Chrome to Phone – Opens a link on your device, directly from a click in Chrome on the PC.

Apps Organizer – Does what it says on the tin. I use it in conjunction with…

Multicon – Allows you to create multiple icons in one widget space. Great for the home screen.

Barcode Scanner – Scans most anything, including QR codes.

Dropbox – Dropbox client.

ES File Explorer – Best all round free explorer for file system and network

GMote – Remote control any PC. Also allows streaming music as well now.

Handcent SMS – Replacement to the standard SMS client. Supports plugins including Emoji and lots of other things.

Hullo Mail – Intelligent voicemail, push notifications, push to gmail allsorts of stuff.

Google Music – Sync’s your local collection to the cloud, allows it to be played anywhere your device has a connection.

Spotify – In a similar vain to above, however needs a Spotify paid account.

Notifo – Not in the market yet, but available to try out. Push notifications for all sorts, including Twitter.

Twitter – Official Twitter client. Works and always reliable.

Twidroyd – My current favourite Twitter client. Although had a couple of FC’s

Plug in Launcher – Get your device to do stuff when you plug things in (Headphones, Power, USB). Can launch any app on the events, as well as do some basic commands

Tasker – If you want a little more power than Plug in launcher then this is the app for you, the possibilities are endless as to what can be done with this application. Have a look here for some of the info on what’s possible.

Mobo Player – Media player, plays pretty much anything.

SMS Backup+ – Backs up your SMS messages automatically to your GMail account

Spare Parts+ – Tweak and change a bunch of Android stuff. Think of this as the options missing from the Settings app.

Sweet Dreams – Sets ringer and device profile based on time/location/surrounding noise. It’s an Auto Nightmode app basically. It’s great though because it’s fire and forget

Thrutu – Not 100% about this one at the moment, but seems useful. Pop’s up when you make a call and offers extended interactivity with the other person as long as they have it as well. Stuff ranges from doodling, location, Paypal transfers and various others.

Uninstaller – Does exactly what it says. Uninstalls apps without the need to go into market or settings.

There is obviously a whole bunch I’ve not mentioned as I’m sure you have bumped into them already (Paypal, Ebay, Earth, GMail, Maps/Nav)

Have I missed owt? pop em in the comments and I’ll update the post.

More to come, next up, Android the Rooted tool… and then Windows Phone 7…