Open window

Think globally, act locally!!

Configure Firefox To Use SSH SOCKS Proxy Tunnel November 9, 2009

Filed under: Interesting — Sheikh Jafar Tarique @ 10:13 am

The following instructions need to be done AFTER your ssh client (i.e. PuTTY) has been configured to open a secure tunnel. Connecting through the tunnel with Firefox (or any other program) only works while the tunnel is actively open. This means you must stay logged in for the entire time you are browsing. For instructions on downloading and configuring PuTTY, click here.

To configure Firefox to work with the proxy follow these instructions:

1. Open FireFox.
2. Click ‘Tools’ at the top to pull down the Tools Menu.
3. From the menu, select ‘Options…’ at the very bottom. This opens the Options window.
4. Click ‘Advanced’ at the top right corner of the window.
5. Click the ‘Network’ tab.
6. Where it says ‘Configure how Firefox connects to the Internet’ click the ‘Settings…’ button. This opens the Connection Settings window.
7. Select ‘Manual proxy configuration:’.
8. Where it says ‘SOCKS Host:’ enter localhost into the box.
9. 9) Where it says ‘Port:’ enter 9853 into the box.
10. Click the ‘OK’ button.
11. Click the ‘OK’ button on the previous window.
12. In the browser location bar (the place where you type web addresses), type about:config and press Enter. This opens a different set of Firefox preferences.
13. Where it says ‘Filter:’ at the top, type network.proxy.socks. The list of preferences will automatically change to show your proxy preferences.
14. Highlight ‘network.proxy.socks_remote_dns’ by clicking it only once. Then, right-click it. This opens a small pull-down menu. Select ‘Toggle’ from the menu to change its value to ‘true’. This adds privacy by preventing DNS queries from leaking. This is the reason why Firefox is recommended over other browsers for using this service.
15. Close Firefox and restart it.
16. Go to a site like cmyip.com to check and make sure your IP address shows up as the proxy address and not your real IP.

 

Bash prompt goodies – PS1 varible October 19, 2009

Filed under: Interesting — Sheikh Jafar Tarique @ 10:28 am
sample

In the above picture you see useful thing:

the user name is Red colored, host name is Blue and current directory is colored with Black. This will help you while you are working with multiple tab at a time-

In bash you can customize you prompt using the environment variable PS1. In order to get the above result insert the following in your .bashrc or .profile file.

export PS1=”\e[1;31m\]\u\e[1;30m\]@\e[1;34m\]\h \e[0;30m\]\w$ “

 

Howto: Convert Redhat and Fedora .rpm files to .deb files in Ubuntu July 13, 2009

Filed under: Interesting — Sheikh Jafar Tarique @ 5:37 am

Did you find an rpm that isnt available as a .deb file? I would share the easy process of converting rpm to deb, check it out.

To do this, install Alien using:

sudo apt-get install alien

And convert using:

sudo alien -k name-of-rpm-file.rpm

To install .deb packages, double click the file and click Install Package or simply:

sudo dpkg -i name-of-created-deb-file.deb

Alternatively you can simply install rpm files, This command converts rpm to deb then installs the deb file, after it will delete the temporary .deb created
sudo alien -i name-of-rpm-file.rpm

Cheers!!!

 

more on `sed` June 7, 2009

Filed under: Interesting — Sheikh Jafar Tarique @ 6:42 am

1. Deleting 2-5 line from a file

sed ‘2,5d’ file.txt

2. Deleting from line 25 to end of a file

sed ‘2, \$d’ file.txt

3. Printing 5-8 line of a file

sed -ne 5,8p file.txt

4. Printing 6 to end

sed -ne “6, \$p” file.txt

5. Printing line 4, 7, 22

sed -ne 4p -e 7p -e 22p file.txt

 

Perl in text formatting June 7, 2009

Filed under: Interesting — Sheikh Jafar Tarique @ 6:09 am

1. selecting desired range of text from a log file, particularly timed data -

perl -ne ‘print if m{^2008-12-22 10:46} .. m{^2008-12-22 11:52}’ log.2008-12-22 >~/20081222-ws02

or

perl -ne ‘print if m#Full thread# … m#”VM Periodic Task#’ >~/out