Serve and Reach a Page

Linux lab Intermediate 4 tasks 20 points

Put up a small web page and prove it's reachable. Create the page, start a web server on port 8080, check it's listening, and fetch it with curl. Password: student.

How it works: the terminal below is a real Linux machine running in your browser. Click it and type. Tasks tick themselves off as you complete them; questions are answered in the box under each task. Press Reset any time for a fresh machine. Your password on this machine (for sudo) is student.

student@vulntech:~ Starting…
Getting your Linux machine ready…
The first start downloads about 20 MB. After that your browser keeps it, and labs start in a moment.

Hints

busybox httpd needs no sudo for a high port like 8080.

curl -s URL > file saves the response to a file.

Solution explanation

busybox httpd -p 8080 -h ~/site starts a web server on port 8080 serving your directory; it returns to the prompt because it runs in the background. ss -tln shows it listening on :8080, and curl connects to 127.0.0.1:8080 as a client and saves the page it gets back.

Show solution
echo "welcome aboard" > ~/site/index.html
busybox httpd -p 8080 -h ~/site
ss -tln | grep 8080
curl -s http://127.0.0.1:8080/ > ~/page.html
cat ~/page.html
HOME LEARN COMMUNITY DASHBOARD