Archive for May, 2008

Missing Google Gears on its first birthday

May 29, 2008

Happy Birthday Google Gear, oh I forgot its only “Gears” now. Long Live Gears, but unfortunately I have been missing you alot. ou have been quite useful for me all this time, but unfortunately I love Firefox more then anything else and being on Firefox 3, I don’t have you anymore.

Hopefully this will fixed soon and I will be able to have you back in my FireFox. I am a happy user of Ubuntu 8.04 (Hardy) which comes with FireFox 3, which is just so awesome that I can’t go back to FireFox 2 and for this I had to sacrifice. My most of Google extensions don’t work anymore in Firefox 3 which includes Google Gears too.

I still want to have all those extensions back, but not sure how much time will it take, I have also read that FireFox 3 is going to be released in June, they have already released rc2 of FireFox 3. So stay tuned every one, FireFox 3 stable is coming soon.

Related Link:

Advertisements

Generating squid “myip acl” and tcp_outgoing_address for all your IPs on FreeBSD

May 26, 2008

This is the perl script which generates squid “myip acl” and tcp_outgoing_address directives for all the IPs configured on FreeBSD except localhost IP (i.e 127.0.0.1), I have written this script to help my friend configure squid as I describe here.

#!/usr/bin/perl
open(IFCONFIG, "ifconfig em0 |");
$count=1;
@acls = ();
@tcps = ();
while (<IFCONFIG>) {
  if (/inet/) {
    s/^\s+//;
    @tokens = split(/ /);
    if (! ($tokens[1] =~ "127.0.0.1")) {
       push(@acls, "acl ip$count myip $tokens[1]\n");
       push(@tcps, "tcp_outgoing_address $tokens[1] ip$count\n");
       $count++;
    }
  }
}
close(IFCONFIG);
foreach $acl (@acls) {
  print $acl;
}
foreach $tcp (@tcps) {
  print $tcp;
}

Click the “View Plain” link above the code, copy the code from the new window and use it.

I know its not commented but I didn’t had much time because of my Google Summer of Code, and the script is so trivial that I didn’t feel like commenting it.

Setup squid proxy server to use multiple outgoing IP addresses

May 26, 2008

A friend of mine needed my help to configure squid server to use multiple IP addresses based on the squid’s IP being used as proxy server. I told him that he can configure the squid server using following squid acls and tcp_outgoing_address directives.

acl ip1 myip 192.168.1.2
acl ip2 myip 192.168.1.3
acl ip3 myip 192.168.1.4
tcp_outgoing_address 192.168.1.2 ip1
tcp_outgoing_address 192.168.1.3 ip2
tcp_outgoing_address 192.168.1.4 ip3

The acl lines tell squid to match myip which means if someone uses the IP 192.168.1.2 as their proxy server they will match the acl ip1 and so on..

Update: But his problem was not solved by this, because he had to configure squid for 500+ IPs and doing this by hand is not worth it when you have so many languages out there. So I wrote a small perl script for him to generate squid acl and tcp_outgoing_address directives for all IPs.