Skip to content
Snippets Groups Projects
user avatar
timbastin authored
7fd92840
History
Name Last commit Last update
..
static
README.md
docker-compose.yaml
nginx.conf

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
events {}
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 _;

        # 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