SECURE ACCESS TO WEB APPS ON LINUX
by JJ Slabbert in Circuits > Raspberry Pi
1397 Views, 18 Favorites, 0 Comments
SECURE ACCESS TO WEB APPS ON LINUX
What You Will Need
Anny linux based computer with an SSH server, a basic webserver (apache is an overkill, httpd of busybox will do)
A second computer or tabled with an SSH client.
Get to Work
Install elinks on the Linux with SSH and the webserver. Elinks is a text browser and does not support images, videos vb script flash etc.
sudo apt-get install elinks
Load a basic web page on the web server. See your webserver docs for howto. On httpd of busybox, just copy the page in /var/www/ or /var/www/cgi-bin/
If the page have dynamic content add the following meta tags in the HTML HEAD since elinks does not auto refresh and will always use the sessions cache to generate html displays.
<meta http-equiv="refresh" content="30"><meta http-equiv="pragma" content="no-cache"><meta http-equiv="expires" content="-1">
The above meta tags work well with elinks
NOTE: meta tags are applicable to the complete page and should not be closed.
Forward port 22 on your router to point to your linux box and also get your internet IP address from your router.
Testing
SSH into the linux box with the webserver
Run:
elinks
type in the adress of you web page http://127.0.0.1/html_file_name or
http://InternetIP/html_file_name
RESULT: SECURE ACCESS TO YOUR LOW END LINUX SERVER.
If you do not have a fixed IP for your webserver box, install a dynamic dns client. NO-IP works well with Debain Linux (PhidgetSBC or Raspberry PI)