Hey leute, ich habe folgendes Problem. Ich habe auf meinem Notebook OpenVPN installiert der immer mit dem Uni-Netzwerk verbunden ist. Ich moechte auch das keine Verbindung außerhalb des VPN's durch geht. Ich bin recht neu bei Linux/Ubuntu/Debian und habe nach fertigen Skripten gesucht und bin auf einem VPN Board auf dieses Script gestoßen :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | #!/bin/bash ########################################### # Created by Thomas Butz # # E-Mail: btom1990(at)googlemail.com # # Feel free to copy & share this script # ########################################### # Adapt this value to your config! VPN_DST_PORT=3478 # Don't change anything beyond this point ########################################### # Check for root priviliges if [[ $EUID -ne 0 ]]; then printf "Please run as root:\nsudo %s\n" "${0}" exit 1 fi # Reset the ufw config ufw --force reset # let all incoming traffic pass ufw default allow incoming # and block outgoing by default ufw default deny outgoing # Every communiction via VPN is considered to be safe ufw allow out on tun0 # Don't block the creation of the VPN tunnel ufw allow out $VPN_DST_PORT # Don't block DNS queries ufw allow out 53 # Allow local IPv4 connections ufw allow out to 10.0.0.0/8 ufw allow out to 172.16.0.0/12 ufw allow out to 192.168.0.0/16 # Allow IPv4 local multicasts ufw allow out to 224.0.0.0/24 ufw allow out to 239.0.0.0/8 # Allow local IPv6 connections ufw allow out to fe80::/64 # Allow IPv6 link-local multicasts ufw allow out to ff01::/16 # Allow IPv6 site-local multicasts ufw allow out to ff02::/16 ufw allow out to ff05::/16 # Enable the firewall ufw enable |
Quelle : http://pastebin.com/AUHh6KnV
Das Script nutzt ufw (http://wiki.ubuntuusers.de/ufw) und ich frage mich ob das bereits ausreicht um zu verhindern das mein Notebook außerhalb des VPNs kommuniziert.
Wenn ich
sudo ufw status
eingebe kommmt folgendes :
To Action From -- ------ ---- Anywhere ALLOW OUT Anywhere on tun0 3478 ALLOW OUT Anywhere 53 ALLOW OUT Anywhere 10.0.0.0/8 ALLOW OUT Anywhere 172.16.0.0/12 ALLOW OUT Anywhere 192.168.0.0/16 ALLOW OUT Anywhere 224.0.0.0/24 ALLOW OUT Anywhere 239.0.0.0/8 ALLOW OUT Anywhere
Wenn ich hier im falschen Forum bin, bitte ich das zu entschuldigen. Ich wusste nicht in welche Kategorie ich dieses Thema posten sollte. Ich hoffe hier kann mir einer etwas helfen. Bin vor kurzem von Windows auf Ubuntu und Debian gewechselt und muss noch viel lernen ;D
Bearbeitet von rklm:
Syntaxhighlighting auf "bash" gestellt. Bitte nutze die Möglichkeiten, die das Forum bietet!
Moderiert von rklm:
Verschoben aus "Shell und Programmieren" zu "Fortgeschrittene Netzwerkkonfiguration".