Skip to content

Commit

Permalink
Adding network script
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardolm committed Oct 17, 2023
1 parent 7ee3622 commit 00b4b6d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions bash/scripts/reset-network.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

sudo dhclient -r || true
sudo iptables -F || true
sudo iptables -F INPUT || true
sudo iptables -F OUTPUT || true
sudo iptables -P INPUT ACCEPT || true
sudo iptables -P OUTPUT ACCEPT || true
sudo ip addr flush eth0 || true
sudo netplan apply || true
sudo service ssh restart || true
ping -c 5 www.docker.com | grep loss
ping -c 5 www.ubuntu.com.br | grep loss
ping -c 5 www.google.com | grep loss

0 comments on commit 00b4b6d

Please sign in to comment.