added hosts file info
Gitea/Baltimore-hackthebox-knowledgebase/pipeline/head This commit looks good Details

s00ner 2022-02-23 18:49:55 -05:00
parent 1dbb06ea50
commit 57bf66bc00
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
# Add the Box to Your Hosts File
It's common for Hack the Box machines to include web servers that respond differently to HTTP requests depending on if you're requesting the IP address directly, the hostname, or a sub-domain.
(This is called [virtual hosting](
For example, on the [Bucket]( machine the webserver gives different responses for ``, `http://bucket.htb`, and `http://s3.bucket.htb`.
There is no DNS service on the HTB network so you have to use your [hosts file]( to resolve the different host names into the IP address.
For the Bucket machine, we'd add the following line to `/etc/hosts`:
` bucket.htb s3.bucket.htb`
You can do this easily from the command line with `sudo nano /etc/hosts` use the nano text editor to add the line.
To make sure it's working you can try `ping bucket.htb` and it should ping