code.fastix.org

Dateiansicht:

Datei:Projekte -> Linux:Netzwerk für Seminare -> Router_Server -> root -> bin -> stop_seminarnet
md5:fc8b0e04d5f421b5971d2fe1fa748a2f
sha1:a4c8f285a4e1c3f53af3a2edcf8f9abe7aa80afd
  1. #!/bin/bash
  2. #set -x;
  3. source "$(dirname $0)/seminarnet.settings";
  4.  
  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.