A Bash web server

Nice oneliners which may be useful to show some console output via HTTP.

An example of showing the iptables FORWARD chain:

Then go to http://ip.add.re.ss:8080 and you will see the output as a web page. In case of adding new rules renew the webpage and you will see the newly added rules.

To report file system disk space usage:

More info: https://www.linux-magazine.com/Issues/2021/250/Bash-Web-Server/(offset)/3/(tagID)/92#

Tags: , ,

Comments are closed.