Newer
Older
# Aufgabe 1
## b)
> Frage: Warum ist es in vielen Fällen sinnvoll, den Zugriff auf Webserver mittels IP-Adresse zu blockieren?
Da Menschen normalerweise nicht über die IP-Adresse auf einen Server zugreifen. Möglicherweise handelt es sich um einen Hacker, der böses im Sinn hat.
## c)
```
# ningx.conf
# events is necessary - otherwise the server wont start
http {
server {
# listen on port 80 and 443 for ipv4 and ipv6 requests
listen 80;
listen [::]:80;
# if the requested hostname does match one of the following, check the location block.
server_name localhost tbasti2s.l3montree.com tbasti2s.l3montree.education;
location / {
# always return static files
root /www/data;
}
}
server {
# listen on port 80 and 443 for ipv4 and ipv6 requests
listen 80 default;
listen [::]:80 default;
server_name _;
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# there is no server name provided here - match anything else
location / {
# return the error index.html
root /www/data/error;
}
}
}
```
```
# docker-compose.yaml
version: '3'
services:
# The load balancer
nginx:
image: nginx:1.16.0-alpine
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- ./static:/www/data
networks:
my_ipv6:
ipv6_address: 2001:638:408:200:fe10:cafe::7777
loc_ipv6:
networks:
my_ipv6:
external:
name: my_ipv6
loc_ipv6:
external:
name: loc_ipv6
```
# Aufgabe 2
## c)
Die Sicherheit der Kommunikation zwischen dem Client und dem Cloudflare Proxy ist nun mittels TLS abgesichert. Dennoch bleibt die Kommunikation zwischen dem nginx Server und dem Cloudflare Proxy unverschlüsselt:
Client -- TLS --> Cloudflare Proxy -- Unverschlüsselt --> Server
Client <-- TLS -- Cloudflare Proxy <-- Unverschlüsselt -- Server