code.fastix.org

Dateiansicht:

Datei:Projekte -> Linux:Netzwerk für Seminare -> Router_Server -> root -> bin -> stop_seminarnet
md5:1cb77fce3077840f693c6a63b60fb2ef
sha1:cf380d5151acc6c886b3588bde2855298ca4535d
Download-Link:Download
  1. #!/bin/bash
  2. # set -x;
  3. source "$(dirname $0)/seminarnet.settings";
  4. route del -net ${net}/${netmask}
  5. sysctl net.ipv4.ip_forward=0 > /dev/null;
  6. systemctl stop isc-dhcp-server;
  7. systemctl stop privoxy
  8. systemctl stop squid
  9.  
  10. #dnsproxyPid=$(ps -C dnsproxy -o "pid=";);
  11. #if [ -n ${dnsproxyPid} ]; then
  12. #       kill ${dnsproxyPid};
  13. #fi
  14.  
  15. ip address del ${ip}/${netmask} dev ${localnetDev}
  16. ip link set ${localnetDev} down
  17. nmcli connection down ${localnetDev}
  18. iptables --flush
  19.