Featured Post

Using USB CDMA modem to setup a home/private WiFi network

The idea here is to give a ‘how-to’ on setting up a a home WiFi network using mobile, CDMA based USB modem, hoping that bandwidth that you obtain from this service is satisfactory :-) Hardware Requirements: Linux PC/Notebook/Netbook Wifi Access point connected to ethernet port of the Linux box CDMA-1x USB Modem (Device used: Reliance M880) Software/OS Requirements: Linux Operating System with “usbserial” and “cdc_acm” device driver modules “pppd”, “wvdial”, “iptables”, and “dnsmasq” applications and their dependencies installed on the System Setup: The steps followed in setting up this CDMA based connectivity can be split into 3 steps, as follows. Configuring kernel modules for auto-loading at bootup Configuring “wvdial” application for dialup / ppp connection Initializing / starting the CDMA modem connection Setting up “iptables” for NAT forwarding Setting up “dnsmasq” for resolving DNS and as DHCP server Configuring kernel modules for auto-loading at bootup Open

Using git over proxy

I was trying to clone Android repository at office when this problem of “Connection refused” started coming when running the ‘repo’ tool. On subsequent googling, I got this really useful link (thanks to Emil Sit) which explained how git can be used over http proxy for those git servers which don’t allow http method as an alternate/bypass to git protocol (As it looks is the case with Android git repository).

Ok, in short, here is what I have done;
  • Typed in the below lines (quoted) into a shell script called gitproxy and put it in $(HOME)/bin directory. Of course, its executable bits has to be set with chmod a+x $(HOME)/bin/gitproxy. My $(HOME)/bin directory is already part of PATH so that I can access my custom scripts easily.
    # Use socat to proxy git through an HTTP CONNECT firewall.
    # Useful if you are trying to clone git:// from inside a company.
    # Requires that the proxy allows CONNECT to port 9418.
    # Save this file as gitproxy somewhere in your path
    # (e.g., ~/bin) and then run
    # chmod +x gitproxy
    # git config --global core.gitproxy gitproxy
    # More details at http://tinyurl.com/8xvpny;
    # Configuration. Common proxy ports are 3128, 8123, 8000.
    exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport
    Note: I replaced proxy.yourcompany.com with appropriate proxy-server details for my organization and the value for _proxyport with an appropriate value used in my organization (instead of 3128).
  • Installed the package socat with the command; sudo apt-get install socat
  • Ran the command git config --global core.gitproxy gitproxy to configure ‘git’ to use the gitproxy.
  • With the http_proxy environment variable already set using preferences menu in GNOME desktop, I could now able to run git and get the repositories without the annoying “Connection refused” problem.


Popular posts from this blog

Using USB CDMA modem to setup a home/private WiFi network

How to extract an initrd image

Debian Squeeze and Mac OSX Lion - Dual boot