Skip to content

Instantly share code, notes, and snippets.

View wanlebing's full-sized avatar

万乐冰 wanlebing

View GitHub Profile
@wanlebing
wanlebing / scapy_tcp_handshake.py
Created October 18, 2017 02:50 — forked from tintinweb/scapy_tcp_handshake.py
simple scapy tcp three-way handshake
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# Author : [email protected] <github.com/tintinweb>
'''
A simple TCP three-way handshake example
#> python scapy_tcp_handshake.py
DEBUG:__main__:init: ('oststrom.com', 80)
DEBUG:__main__:start
DEBUG:__main__:SND: SYN
@wanlebing
wanlebing / build-ovs-rpms.sh
Created December 8, 2017 09:47 — forked from dave-tucker/build-ovs-rpms.sh
Build RPMs for every version of Open vSwitch
#!/bin/bash
# Copyright 2014 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# From @andyhky (http://virtualandy.wordpress.com)
# Upgrading OVS is discussed at length here: http://wp.me/pp5B3-aZ
---
- name: Upgrade OVS
hosts: "*"
gather_facts: false
connection: ssh
user: root
tasks:
@wanlebing
wanlebing / Suricata Tunning.md
Created April 8, 2018 12:39
RX/TX Buffers, Flow Hash and Others on Boot

After installing Suricata, some fine tuning of the network interface(s) used in the traffic capture is required to ensure the best performance of the new IDPS installation. Those configurations need to be persisted when the system is power cycled. To do that on a Enterprise Linux based OS (RedHat, CentOS, Fedora, etc.) one can leverage the /sbin/ifup-local script.

@wanlebing
wanlebing / tc.sh
Created June 27, 2018 03:45 — forked from jedy/tc.sh
tc带宽控制
#!/bin/bash
#脚本文件名: tc2
#########################################################################################
#用TC(Traffic Control)解决ADSL宽带速度技术 Ver. 1.0 by KindGeorge 2004.12.27 #
#########################################################################################
#此脚本经过实验通过,更多的信息请参阅http://lartc.org
#tc+iptables+HTB+SFQ
#
#一.什么是ADSL? ADSL(Asymmetric Digital Subscriber Loop,非对称数字用户环路)
#用最简单的话的讲,就是采用上行和下行不对等带宽的基于ATM的技术.
@wanlebing
wanlebing / set_container.sh
Created October 23, 2018 06:00 — forked from cizixs/set_container.sh
set up vxlan lab environment
#/usr/bin/env sh
set -e
if [ $# -ne 3 ]; then
echo "Usage: $0 bridgename containername containerip"
exit 1
fi
BRIDGE_NAME=$1