tcpdump -r vagrant_up.pcap -w outfile.pcap "dst port 5150"
tshark -r vagrant_up.pcap -n -T fields -e ip.src -e tcp.srcport -e ip.dst -e tcp.dstport
tshark -r vagrant_up.pcap -T json > /tmp/output.json
jq '.|length' /tmp/output.json
jq '.[4000]' /tmp/output.json
This file contains 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
## IPv6 Tests | |
http://[::ffff:169.254.169.254] | |
http://[0:0:0:0:0:ffff:169.254.169.254] | |
## AWS | |
# Amazon Web Services (No Header Required) | |
# from http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html#instancedata-data-categories | |
http://169.254.169.254/latest/meta-data/iam/security-credentials/dummy | |
http://169.254.169.254/latest/user-data | |
http://169.254.169.254/latest/user-data/iam/security-credentials/[ROLE NAME] |
This file contains 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
AD | 02 | Canillo | |
---|---|---|---|
AD | 03 | Encamp | |
AD | 04 | La Massana | |
AD | 05 | Ordino | |
AD | 06 | Sant Julia de Loria | |
AD | 07 | Andorra la Vella | |
AD | 08 | Escaldes-Engordany | |
AE | 01 | Abu Dhabi | |
AE | 02 | Ajman | |
AE | 03 | Dubai |
This file contains 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 | |
if [ -z "$1" ]; then | |
COUNTRY="ru" | |
else | |
COUNTRY=$1 | |
fi | |
PATTERN=${COUNTRY^^}$ | |
BATCH=50 | |
I=0 | |
ASN_LIST="" |
This file contains 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
#--------------------------------------------------------------------- | |
# Example configuration for a possible web application. See the | |
# full configuration options online. | |
# | |
# http://haproxy.1wt.eu/download/1.4/doc/configuration.txt | |
# | |
#--------------------------------------------------------------------- | |
global | |
log 127.0.0.1 local2 |
This file contains 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
# The following example shows a way to use iptables for basic round-robin load balancing, by redirecting | |
# packets two one of three ports based on a statistic counter. | |
# | |
# TCP packets for new sessions arriving on port 9000 will rotate between ports 9001, 9002 and 9003, where | |
# three identical copies of some application are expected to be listening. | |
# | |
# Packets that aren't TCP or that related to an already-established connection are left untouched, letting | |
# the standard iptables connection tracking machinery send it to the appropriate port. | |
# | |
# For this to work well, connections need to be relatively short. Ideally there would be an extra layer |
This file contains 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 iptables -t nat -L -n -v | |
sudo iptables -t filter -F | |
sudo iptables -t nat -F | |
sudo iptables -t mangle -F | |
sudo iptables -t nat -L -n -v | |
sudo iptables -t nat -A PREROUTING -i eth1 --src 10.3.14.118 --dst 127.0.0.1 -p tcp --dport 1198 -j REDIRECT --to-ports 5000 | |
sudo iptables-save | |
sudo iptables -t nat -L -n -v | |
/*descobrir portas abertas */ |
This file contains 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 | |
# Run as if it was called from cron, that is to say: | |
# * with a modified environment | |
# * with a specific shell, which may or may not be bash | |
# * without an attached input terminal | |
# * in a non-interactive shell | |
# This scripts supports cron jobs run by any user, just run it as the target user (e.g. using sudo -u <username>) | |
# An up-to-date version of this script may be available at https://github.com/daladim/run-as-cron |
This file contains 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 | |
NBATCH=3 | |
NPARALLEL=5 | |
(apt-get -y --print-uris $@ | egrep -o -e "http://[^\']+" | xargs -r -l${NBATCH} -P${NPARALLEL} wget -nv -P "/var/cache/apt/archives/") && apt-get $@ |
A network bridge allows us to have a virtual router that we can plug multiple network interfaces into. The IP address is assigned to the bridge rather than the individual network interface.
Create the bridge device, br0 :