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 | |
# Basic QoS script that uses OpenDPI (http://www.opendpi.org/) | |
# Netfilter wrapper to identify packets by the protocol. | |
# | |
# This script enqueues packets in three queues, each one | |
# with a different priority: | |
# | |
# The first queue has the higher priority and gets the TCP SYN | |
# packets, ACKs, ICMPs and packets with Minimize-Delay TOS. |
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
/* | |
* Copyright (c) 2009-2010, Salvatore Sanfilippo <antirez at gmail dot com> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are met: | |
* | |
* * Redistributions of source code must retain the above copyright notice, | |
* this list of conditions and the following disclaimer. | |
* * Redistributions in binary form must reproduce the above copyright |
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
import org.springframework.beans.BeansException; | |
import org.springframework.beans.factory.InitializingBean; | |
import org.springframework.context.ApplicationContext; | |
import org.springframework.context.ApplicationContextAware; | |
import org.springframework.util.Assert; | |
public abstract class InjectableProperty implements InitializingBean, ApplicationContextAware | |
{ | |
private String beanName; |
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
#!/usr/bin/env python | |
import sys | |
import NZA | |
def print_volumes_by_pool(pool): | |
volumes = NZA.nms.zvol.get_names_by_prop('volume_name', pool, '') | |
for volume in volumes: | |
name = NZA.nms.zvol.get_child_prop(volume, 'name') | |
size = NZA.nms.zvol.get_child_prop(volume, 'size') |
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 | |
echo "Generando reglas iptables..." | |
# Borramos las reglas de las cadenas y los contadores | |
iptables -F | |
iptables -X | |
iptables -Z | |
iptables -t nat -F | |
# Establecemos las políticas por defecto |
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 | |
BANFILE='/root/banned' | |
iptables -N BANNED | |
if [ -f ${BANFILE} ]; then | |
for IP in `sort -ru ${BANFILE}`; do | |
iptables -A BANNED -s ${IP} -j DROP | |
done | |
fi |
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 | |
# | |
# This is an example iptables script to configure | |
# a firewall for a personal machine. | |
# | |
# It filters bad packets and bans the desired IP | |
# addresses, and allows remote connections to a | |
# controlled set of ports. | |
# |
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
/** | |
* Abiquo community edition | |
* cloud management application for hybrid clouds | |
* Copyright (C) 2008-2010 - Abiquo Holdings S.L. | |
* | |
* This application is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU LESSER GENERAL PUBLIC | |
* LICENSE as published by the Free Software Foundation under | |
* version 3 of the License | |
* |
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
package com.abiquo; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.net.URL; | |
import java.net.URLConnection; | |
import java.util.HashSet; | |
import java.util.Set; |
OlderNewer