This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: | |
# https://www.cloudflare.com/ips | |
# https://support.cloudflare.com/hc/en-us/articles/200169166-How-do-I-whitelist-CloudFlare-s-IP-addresses-in-iptables- | |
for i in `curl https://www.cloudflare.com/ips-v4`; do iptables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
for i in `curl https://www.cloudflare.com/ips-v6`; do ip6tables -I INPUT -p tcp -m multiport --dports http,https -s $i -j ACCEPT; done | |
# Avoid racking up billing/attacks | |
# WARNING: If you get attacked and CloudFlare drops you, your site(s) will be unreachable. | |
iptables -A INPUT -p tcp -m multiport --dports http,https -j DROP |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# wget -O - https://gist***/lockdown.sh | bash | |
# Lock down SSH | |
sshport=$(shuf -i 49152-65000 -n1) && | |
sed -i "s/Port 22/Port $sshport/; s/PermitRootLogin yes/PermitRootLogin no/; s/#PasswordAuthentication yes/PasswordAuthentication no/" /etc/ssh/sshd_config && | |
# Get wordlist | |
apt-get update && | |
apt-get install -y wamerican && |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GET /myrahost/list.aspx?weighed=1 HTTP/1.0 | |
Host: secure.logmeinrescue.com | |
Pragma: no-cache | |
Connection: Keep-Alive | |
User-Agent: Product=LogMeIn Rescue;Component=IC Applet;Version=7.6.403.1728;LMIOS=16844544; | |
Content-Length: 0 | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tar -cvpf - --one-file-system / --exclude=/swapfile | lz4 - /mnt/[put drive here]/system.backup.tar.lz4 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ > iperf -u -c 10.8.0.14 -t60 -P32 | |
------------------------------------------------------------ | |
Client connecting to 10.8.0.14, UDP port 5001 | |
Sending 1470 byte datagrams | |
UDP buffer size: 208 KByte (default) | |
------------------------------------------------------------ | |
[ 34] local 10.8.0.6 port 44930 connected with 10.8.0.14 port 5001 | |
[ 4] local 10.8.0.6 port 53085 connected with 10.8.0.14 port 5001 | |
[ 5] local 10.8.0.6 port 41582 connected with 10.8.0.14 port 5001 | |
[ 3] local 10.8.0.6 port 50268 connected with 10.8.0.14 port 5001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ > iperf -c 192.168.1.138 -t60 -P32 | |
------------------------------------------------------------ | |
Client connecting to 192.168.1.138, TCP port 5001 | |
TCP window size: 85.0 KByte (default) | |
------------------------------------------------------------ | |
[ 24] local 192.168.1.175 port 40313 connected with 192.168.1.138 port 5001 | |
[ 5] local 192.168.1.175 port 40292 connected with 192.168.1.138 port 5001 | |
[ 4] local 192.168.1.175 port 40291 connected with 192.168.1.138 port 5001 | |
[ 3] local 192.168.1.175 port 40290 connected with 192.168.1.138 port 5001 | |
[ 7] local 192.168.1.175 port 40293 connected with 192.168.1.138 port 5001 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ > ping -fi0.2 192.168.1.1 -c1000 | |
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data. | |
--- 192.168.1.1 ping statistics --- | |
1000 packets transmitted, 1000 received, 0% packet loss, time 200398ms | |
rtt min/avg/max/mdev = 0.883/1.457/70.247/2.956 ms, ipg/ewma 200.599/1.183 ms | |
~ > ping -fi0.2 192.168.1.138 -c300 | |
PING 192.168.1.138 (192.168.1.138) 56(84) bytes of data. | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Installing | |
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 2048 -cdrom ~/Downloads/Win10_English_x64.iso -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -drive file=~/Downloads/virtio-win-0.1.105.iso,index=1,media=cdrom | |
# Running | |
qemu-system-x86_64 -bios /usr/share/ovmf/ovmf_x64.bin -enable-kvm -cpu host -smp 4 -m 4096 -net nic,model=virtio -net user -drive file=~/vm/win10.hd.img.raw,format=raw,if=virtio -vga qxl -usbdevice tablet -rtc base=utc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ > iperf -u -c 10.8.0.14 -t600 -b 31M | |
------------------------------------------------------------ | |
Client connecting to 10.8.0.14, UDP port 5001 | |
Sending 1470 byte datagrams | |
UDP buffer size: 208 KByte (default) | |
------------------------------------------------------------ | |
[ 3] local 10.8.0.6 port 59585 connected with 10.8.0.14 port 5001 | |
[ ID] Interval Transfer Bandwidth | |
[ 3] 0.0-600.0 sec 2.17 GBytes 31.0 Mbits/sec | |
[ 3] Sent 1583073 datagrams |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for x in `yaourt -Qmq`; do yaourt -Si "$x" || echo "$x" >> missing.txt; done |