[201/lab sheet] ipa ddr -> hostname -I
All checks were successful
continuous-integration/laminar-elessar Build 76 succeeded in 1 minute 15 seconds .
All checks were successful
continuous-integration/laminar-elessar Build 76 succeeded in 1 minute 15 seconds .
This commit is contained in:
parent
3d42f255ff
commit
71cb2f0ce5
1 changed files with 5 additions and 2 deletions
|
@ -356,12 +356,14 @@ sudo ufw allow http
|
|||
```
|
||||
|
||||
### Testing it out
|
||||
At this point you should bee able to type the IP address of your server into your web browser and see the default configuration page. You can inspect the network interfaces and ask them for their IP addresses. This is done like so:
|
||||
At this point you should bee able to type the IP address of your server into your web browser and see the default configuration page. You can obtain your server's IP address by using the `hostname` command like so:
|
||||
|
||||
```bash
|
||||
ip addr
|
||||
hostname -I
|
||||
```
|
||||
|
||||
<!--
|
||||
|
||||
This will produce a lot of output, so let's decode it. For an IPv4 address, we want to look at the bit directly after the word `inet` in the output from the command above for our server's ethernet network interface.
|
||||
|
||||
You may notice that the output follows a pattern, in which the unindented lines follow the pattern `number: interface_id blah blah blah......`. To identify the ethernet network interface, look for the entry in the output list that has an id that looks something like any of these:
|
||||
|
@ -395,6 +397,7 @@ Once identified, look for the `inet` keyword directly after the network interfac
|
|||
```
|
||||
|
||||
....I could identify that my server's IP address is `1.2.3.4`, as `1.2.3.4` appears directly after the word `inet`, which appears a line or two below the line that starts with `2: eth0`.
|
||||
-->
|
||||
|
||||
Another, but less reliable, way of finding your IP address is to use an online service. Such services report back to you your external IP address. If your server is located on a complex network, the IP address such a service reports may not be the local IP address of your server, however. You can utilise a service like this as follows:
|
||||
|
||||
|
|
Loading…
Reference in a new issue