Advertisement
metalx1000

Webserver with Loopback interface only

Apr 14th, 2025
536
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.84 KB | None | 0 0
  1. mkdir www
  2. cd www
  3.  
  4. # create index web page and start server
  5. echo "Hello" > index.html
  6. busybox httpd -vf -p8888
  7.  
  8. # check connection with client
  9. wget -qO- "http://127.0.0.1:8888"
  10. wget -qO- "http://localhost:8888"
  11. wget -qO- "http://192.168.1.158:8888"
  12. brave "http://127.0.0.1:8888"
  13. brave "http://localhost:8888"
  14. brave "http://192.168.1.158:8888"
  15.  
  16. # create httpd webserver config file with restrictions
  17. # busybox will look for httpd.conf in current directory
  18. # or you can tell it to look for it in a set place
  19. echo "A:127.0.0.1" > httpd.conf
  20. echo 'D:*' >> httpd.conf
  21. busybox httpd -vfc httpd.conf -p8888
  22.  
  23. # check connection with client
  24. wget -qO- "http://127.0.0.1:8888"
  25. wget -qO- "http://localhost:8888"
  26. wget -qO- "http://192.168.1.158:8888"
  27. brave "http://127.0.0.1:8888"
  28. brave "http://localhost:8888"
  29. brave "http://192.168.1.158:8888"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement