Introduction
Lynx is simply a web browser for command line interface. It is a fully-featured World Wide Web (www) client which shows the web page contents in a simple terminal. Here the plain ASCII text is displayed without including the multimedia contents of the web page. The hypertext markup language (HTML) can be viewed using the Lynx web browser and the keyboard can be used to navigate to links within the web page.
Lynx web browser demands minimal usage of the mouse. Also in Lynx multimedia images cannot be viewed vis-a-vis graphical browsers. However, it is possible to transfer these graphical images as well as other binary files for later use by other applications. The asterisk key (*) helps to indicate where the images are present. Unlike the graphical browsers, it is not possible for us to play sound files using Lynx and it is considered as a fully cursor-addressable web browser. Also, it is one of the oldest web browsers, which is used widely even today.
Lynx can be used to collect information on WWW or to build information systems intended primarily for local access. For modern users, it consumes less information transfer compared to the graphical browsers which can load large multimedia files.
How to handle web contents displayed using Lynx?
The Lynx web page is fully managed using the keyboard.
>> The UP and DOWN arrows help to navigate through the web pages.
>> The space button is used to forward to the next page.
>> The left arrow key is used to go back to a previous page.
>> The right arrow key is used to select a link.
>> To get the URL of the page which we are currently working on, ‘=’ is used.
>> To jump to another URL from the current page, use ‘g’ and then enter the full URL.
>> Like graphical browsers, it is possible to add bookmarks in Lynx also. For this, you need to navigate to the link which you wish to add as a bookmark and then press ’a’ and ‘d’ to save the link as the bookmark. Use ‘v’ to view all saved bookmarks.
Application of Lynx in server management.
Lynx helps us view the server status feature of WHM (Web Host Manager) from the command line on your VPS (Virtual Private Server) or dedicated server in order to review recent website requests that Apache is handling. Follow the below-given steps for the same:
1. Login to the server via ssh.
2. Run the following command to see what domain currently has the most requests going to it:
lynx -dump –width=500 localhost/whm-server-status | egrep “GET|POST” | awk ‘{print $12}’ | sort | uniq -c | sort -n
The result might be as follows:
1 nepalpolity.com
4 emailkhabar.com
7 aayogtayari.com
7 bhaktapuronline.net
28 tufoe.edu.np
This shows that the domain is having the most number of requests.
3. To view the requests for the one domain that gets the highest amount of requests, say for example tufoe.edu.np, use the command:
lynx -dump –width=500 localhost/whm-server-status | egrep “GET|POST” | grep tufoe.edu.np | awk ‘{print $14}’ | sort | uniq -c | sort -n
The display will be as follows:
1 /index
1 /programmes
2 /googlesearch?q=Bed+1year+routine&button=Go
2 /googlesearch?q=M.ed+result&button=Go
2 /googlesearch?q=result+of+second+semester&button=Go
4. We can check the IP addresses hitting /googlesearch?q=result+of+second+semester&button=Go to see if the activity is malicious in nature:
lynx -dump –width=500 localhost/whm-server-status | egrep “GET|POST” | grep tufoe.edu.np | awk ‘{print $11}’ | sort | uniq -c | sort -n
The result will be as follows:
106.223.130.203
113.199.136.88
120.89.108.95
5. We can deny those IPs using csf -d 106.223.130.203
Thus, we can investigate the current Apache requests that are happening on your server using the whm-server-status feature of WHM.