Showing posts with label Internet. Show all posts
Showing posts with label Internet. Show all posts

Sunday, November 15, 2009

LAMP server on Ubuntu

Share Orkut

If you want to have a LAMP server on your Ubuntu machine, but found if difficult to install the different components seperately, the geeks (developers) at Ubuntu have literally made it as good as spoon-feed. For the un-initiated, LAMP is a software bundle for Linux, consisting of Apache HTTP server, MySQL (database component), PHP (for scripting).

The result of their efforts is the following command,

sudo apt-get install lamp-server^

Note: The carrot is not a typo-error, its part of the command. It refers to the 'Tasksel packages' for different tasks. If you need to see the complete list type "sudo tasksel" in the console.

Follow the onscreen instructions, you will be prompted to confirm all the packages, reply with 'YES'. While the installation is halfway, you will be prompted to chose a password for the root user on the MySQL database. Enter your password and confirm it.

Thats it, the install is done; now for the configuration part.

1] Apache2: Open "http://localhost/" in a browser window, if you see a page with "It Works" written on it; then you apache2 installation has succeeded.

Open a terminal window, and paste the following into it, to open up apache2.conf;
sudo gedit /etc/apache2/apache2.conf

add an entry to the end of the file; ServerName your-domain.com (you will have to replace your-domain.com)

2] PHP: Open a console, and type
sudo gedit /var/www/phptest.php

here, enter the following code in the gedit document,

<? php phpinfo(); ?>


restart apache2 with the following command
sudo /etc/init.d/apache2 restart


Now open your browser to "http://localhost/phptest.php"; if your PHP install was succesful, this page will list out the details of the PHP installation.

3] MySQL
Open the MySQL configuration,
sudo gedit /etc/mysql/my.cnf


Make sure the following setting is proper.
bind-address = 127.0.0.1


(This is an optional step)
Installing phpMyAdmin
sudo apt-get install libapache2-mod-auth-mysql phpmyadmin

Follow the onscreen instructions to complete the install, you can access it at "http://localhost/phpmyadmin/"

Finally restart the apache2 server;
sudo /etc/init.d/apache2 restart


There you go, your machine is up and running

Saturday, October 17, 2009

pppoe configuration in Ubuntu Linux

Share Orkut

Yesterday after getting irritated with the '$ sudo pon dsl-provider' command for my pppoe connection, I decided to shorten the length or atleast make it simpler, something like '$ sudo pon bsnl' or simply '$ sudo pon'.

According to the MAN pages on pon it requires a parameter to specify the provider which has to be dialed, on absence of provider it executes the file '/etc/ppp/pppoe_on_boot', if it is existing and executable.

Again on lack of arguments to the '$ sudo pon' and absense of the '/etc/ppp/pppoe_on_boot' file (which is created when you specify that the connection be automatically dialed up at startup), in such a case the '/etc/ppp/peers/provider' file is executed' which is often the cause of error to most people.

If you have a look at the file '/etc/ppp/peers/dsl-provider' you'll realise that copying the contents to a new file will enable you to use a command such as '$ sudo pon isp'

Steps for '$ sudo pon isp' - Run the following commands in a terminal:
  • $ sudo cp /etc/ppp/peers/dsl-provider /etc/ppp/peers/dsl-provider.bak (optional)
  • $ sudo cp /etc/ppp/peers/dsl-provider /etc/ppp/peers/isp
Now a command like '$ sudo pon isp' will dial your pppoe connection.

Steps for '$ sudo pon' - Run the following commands in a terminal:
  • $ sudo cp /etc/ppp/ppp_on_boot /etc/ppp/ppp_on_boot.bak
  • $ sudo cp /etc/ppp/peers/dsl-provider /etc/ppp/ppp_on_boot
Now a command like '$ sudo pon' is sufficient for conecting to the internet.

Saturday, August 29, 2009

Qumana – Blog Editor

Share Orkut

I haven't used any blog editor other than the default editor in blogger and MS Word. I had done a search for a blog editor a while ago, but never came across Qumana, until yesterday. Qumana needs Java Runtime Environment installed before you consider installing Qumana. I wanted a editor which would help me post the blog-post without having to sign up at blogger using a browser and editing it over there, (this happens to me at month ends when I desperately try to save some bandwidth), I also wanted a spell checker for proof reading my post. Qumana satisfies all requirements and as an added benefit, it can even integrate AdGenta adverts into your blog-post.

Features:

  • Supports a lot of blog providers including Blogger, Wordpress, TypePad, DairyLand, SquareSpace, Drupal, MSN Space, LiveJournal, etc.
  • Qumana supports AdGenta adverts, which can be inserted by you into your post while editing the post itself.
  • Can manage multiple blogs from the same provider or by multiple providers.
  • Allows editing in multiple modes, i.e. the WYSIWYG mode or the HTML mode.
  • Inserting images and videos is made very simple.
  • Can insert tags and track backs, allow or disallow trackbacks or comments.
  • Has a spell check utility, so that you can correct your mistakes before publishing.
  • One click publish.
  • It can also set the time of posting.

Bummer:

I agree this is a pretty good blog-editor but I loved a feature in MS Word where simple mistakes like capitalization gets corrected automatically, Qumana with its 'spell check as you type' feature comes very close.


 

Get Qumana at http://www.qumana.com/

Wednesday, August 26, 2009

Nmap-online.com – Nmap on the internet

Share Orkut

I had installed Nmap yesterday to scan a particular target of interest to me, but unfortunately I was getting certain errors about Nmap being unable to find the network adaptor, and I couldn't find a way to make it work. A quick Google search revealed this wonderful online Nmap port scanner, www.nmap-online.com

The interface is intuitive, the default option when the website loads is to quick scan your own computer, full Nmap scans of your own system and custom scans, which allow you to scan custom targets with your own parameters are also included, it keeps your scan requests on queue and lets you know the number of requests before it on queue. When I used it last night, there weren't any other requests so I got my results pretty fast and even if there are many requests it has the option of e-mailing the results of the scan to your own e-mail id.

Whats more is, this service may keep your scan anonymous from the target, if he has surveillance installed.

Tuesday, August 25, 2009

Google Analytics – A Web Masters’ Swiss Army Knife

Share Orkut

Why I have called Google Analytics as a Swiss army knife, is the amount of information it gives you about your website or blog, which helps you understand your visitors needs and trends. Frankly speaking, I myself haven't tried any other web statistics service; because after I saw one report of Analytics, I was pretty sure I won't need anything else.

It's not possible for me to go into every aspect of Analytics in just one post, so here is the overview.


 

The Dashboard View:

This is a basic description of most data compressed for a 'one look' understanding of stats like site usage (which consists of visits, page views, pages / visit, bounce rate, avg. time on site, % of new visits), visitor overview, map overlay, traffic sources, content overview. You can chose to view data specific to any of the stats specified from the sidebar on the left, some of them are specified below.


 

Visitor overview:

Displays a graph showing the visitors to your domain, with technical information like the browser used by the visitors and their connection speeds, which web-masters find very useful when writing scripts or html code for specific browsers as different browsers have some difference in the way they render a particular code.

Traffic sources overview:

Displays a graph showing visits to your domain, along with information of the top traffic sources, top referring sites and top keywords which connect to your site.

Map overlay:

Shows a world map with indications which allow you to find the country and region in the country in which your visitors live. It also has a table with columns like country, visits, pages/visit, average time on site, % new visits, bounce rate; and also the site average for all these stats.

Content overview:

Content overview, shows you the top contents in your site, tell you how many times a particular content has been viewed, tell you the top landing and leaving pages for your domain.


 

There is just too much for me to try and explain in a post, and you will understand that when you sign up for Google Analytics. As is with all of Google Products, it's perfectly free.


 

Bummer:

There's only one feature that I wished were present here; real-time statistics. I guess all the other features do more than covering up for this.

Monday, August 24, 2009

Greedy Torrent

Share Orkut

This tool considered by many as the savior of leechers on the bit-torrent protocol, helps them from getting banned on trackers which demand a 1:1 transfer ratio. The communication between your bit-torrent client and the tracker is modified, by telling the tracker that you upload is actually high; even if you aren't uploading.


Features:


Greedy torrent only needs to be configured once during install and never again. The configuration also can be done by a newbie, the upload can be set up to 5 times your download, best factor is that you don't need to change your favorite bit-torrent client.

Anatomy of a simple IP logger in php

Share Orkut

<?php

// IP logger, place file at yourdomain.com/log.php

//This picture variable defines which image to show
$picture = "http://img.infotropic.com/w/w060529_2.jpg";

//Visitor's IP address is stored in the variable '$ip'
$ip = $_SERVER['REMOTE_ADDR'];

//this line tells the logger the name you want to use for the log file.
// if log.txt doesn't already exist, it will be created automatically
$logs = "log.txt";

//here, we open the log.txt for writing to. The 'a' means append to the EOF
$fh = fopen($logs, 'a') or die(" ");

//here we put the ip address into a variable called 'string data'
// the backslash-n starts a new line in the text file, to make it easier to read
$stringData = "$ip \n";

//here we write to the text file what is in the stringdata variable
fwrite($fh, $stringData);

//now we close the file
fclose($fh);


//and finally we echo some html back to the user's browser so they see an image
echo "<img src='$picture'>";

?>


Note:

If you want to learn web technologies, www.w3schools.com is a pretty good website.

Friday, August 21, 2009

Wikipedia hits 3 Million

Share Orkut

Wikipedia, the successor of Nupedia, a free online English language encyclopedia project, has finally hit 3 million articles (in the English language section). It has taken more than 8 years from its launch in January 15, 2001.

The growth on the English Wikipedia has been steady after the 3 years since its inception when it exploded with articles. It has not been devoid of controversy, when it was found that corporate houses modified content to please certain operatives, amid claims by the science journal Nature that it was about as accurate as Encyclopedia Britannica.

Tuesday, August 18, 2009

Hack the most out of Sify Broadband

Share Orkut

Sify Broadband customers, this post is for you.

Most of Sify Broadband customers are on a switched network, making MITM attacks very much possible, some network admins have secured their networks against this kind of attacks, but there still exists the main Flaw in Sify.


(NOTE: THIS ARTICLE IS MEANT FOR EDUCATIONAL PURPOSE ONLY. I WILL NOT BE HELD RESPONSIBLE FOR ANY HARM DONE BY YOU TO YOURSELF OR ANYONE.)

Main flaw in Sify : Their authentication system.

How does Sify authentication system work ?

Sify authenticates a client by checking the following parameters.

1] Username
2] Password
3] IP address
4] MAC address

If any of the above is not matching with the records in their database, you are not logged on.

So whats the flaw ? Everything seems so perfect.
Well suppose Mr. X and Mr. P are friends who have a sify connection, but Mr. P's prepaid account has expired. All he has to do is find out when Mr. X is online and change his IP and MAC address to that of Mr. X. That will get him online on Mr. X's broadband account.

The above means that, if you can find someone who is logged into his Sify Account then you can piggyback on his session and access the Internet. This is also termed as session hijacking. All you need is a IP and MAC address. Username and password are not exactly required if you want to use someone else's connection provided that he/she is logged on.

Method 1:
Search on Google for IP and MAC scanners, I'm sure there are plenty of them out there. A good MAC changer would be Technitium MAC Changer, and you could use Angry IP scanner for getting MAC address and IP address.

Method 2:
Another way to get the IP and MAC is to get control of your switch.

How do I do that ?
Note that your switch is always located at your gateway IP address.
Connect to the switch by typing "telnet 10.xxx.xxx.1" (replace this with IP Address of your switch)
The switch will now ask for a password, go to Governmentsecurity.org for a list of default login and passwords.

Look around the switch to search for the command where all the IP and corresponding MAC are listed.