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
--- | |
148: | |
- 4 | |
- :conn_id | |
8: | |
- :ip4_addr | |
- :ipv4_src_addr | |
7: | |
- 2 | |
- :src_port |
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
## Configure eth0 | |
# | |
# vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
DEVICE="eth0" | |
NM_CONTROLLED="yes" | |
ONBOOT=yes | |
HWADDR=A4:BA:DB:37:F1:04 | |
TYPE=Ethernet | |
BOOTPROTO=static |
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
class MyCallable(object): | |
def __init__(self, urlparts, callable): | |
self.urlparts = urlparts | |
self.callable = callable | |
def __call__(self, **kwargs): | |
print kwargs | |
print self.urlparts | |
def __getattr__(self, name): | |
# Return a callable object of this same type so that you can just keep | |
# chaining together calls and just adding that missing attribute to the |
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
# Please edit /etc/default/ufw first | |
# DEFAULT_FORWARD_POLICY="ACCEPT" | |
# then at /etc/ufw/sysctl.conf | |
# net/ipv4/ip_forward=1 | |
# net/ipv6/conf/default/forwarding=1 | |
# allow mtu dectection | |
iptables -A FORWARD -p tcp --tcp-flags SYN,RST SYN -j TCPMSS --clamp-mss-to-pmtu |
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
ip access-list extended cp-any-any | |
permit ip any any | |
ip access-list extended cp-dns | |
permit udp host 66.230.128.14 eq domain any | |
permit udp host 66.230.128.18 eq domain any | |
ip access-list extended cp-fragments | |
permit ip any any fragments |
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
# /etc/systemd/system/iperf.service | |
[Unit] | |
Description=iperf server | |
After=syslog.target network.target auditd.service | |
[Service] | |
ExecStart=/usr/bin/iperf -s | |
[Install] | |
WantedBy=multi-user.target |
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
# install required packages | |
apt -y update && apt-get -y dist-upgrade | |
add-apt-repository ppa:webupd8team/java | |
apt -y update | |
apt -y install libcairo2-dev libjpeg-turbo8-dev libpng12-dev libossp-uuid-dev libfreerdp-dev libpango1.0-dev libssh2-1-dev libtelnet-dev \ | |
libvncserver-dev libpulse-dev libssl-dev libvorbis-dev libwebp-dev git build-essential autoconf libtool oracle-java8-installer tomcat8 \ | |
tomcat8-admin tomcat8-common tomcat8-docs tomcat8-user maven postgresql-server-dev-9.5 postgresql-common postgresql-9.5 libpulse-dev \ | |
libvorbis-dev freerdp ghostscript wget pwgen | |
# create directories & files |
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
#!/usr/bin/env python | |
"""Functions to convert IPv4 address to integer and vice-versa. | |
Written by Christian Stigen Larsen, http://csl.sublevel3.org | |
Placed in the public domain by the author, 2012-01-11 | |
Example usage: | |
$ ./ipv4 192.168.0.1 3232235521 | |
192.168.0.1 ==> 3232235521 |
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
curl -O https://pypi.python.org/packages/source/p/pip/pip-1.2.1.tar.gz | |
tar xvfz pip-1.2.1.tar.gz | |
cd pip-1.2.1 | |
zypper install python-setuptools | |
python setup.py install | |
ln -sfn /usr/local/bin/pip /usr/bin/pip | |
pip install --upgrade awscli | |
cd .. |
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 | |
## Install Golang 1.6.2 64Bits on Linux (Debian|Ubuntu|OpenSUSE|CentOS) | |
## http://www.linuxpro.com.br/2015/06/golang-aula-1-instalacao-da-linguagem-no-linux.html | |
## Run as root (sudo su) | |
## Thank's **Bruno Albuquerque bga at bug-br.org.br** | |
GO_URL="https://storage.googleapis.com/golang" | |
GO_VERSION=${1:-"1.6.2"} | |
GO_FILE="go$GO_VERSION.linux-amd64.tar.gz" |
OlderNewer