1) Filter Table
Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.
# Custom Execution Module - SUDO ACCESS | |
# tested for Centos 7 | |
import salt | |
import time | |
import os | |
import logging | |
import re | |
from datetime import datetime, timedelta | |
import subprocess |
1) Filter Table
Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.
#!/usr/bin/env python | |
# This Source Code Form is subject to the terms of the Mozilla Public | |
# License, v. 2.0. If a copy of the MPL was not distributed with this | |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | |
# Required packages (available from pip) : pyqrcode, pypng | |
import pyqrcode | |
import base64 |
""" | |
This is an extension of the technique first detailed here: | |
http://sedimental.org/remap.html#add_common_keys | |
In short, it calls remap on each container, back to front, using the accumulating | |
previous values as the default for the current iteration. | |
""" | |
ddns-update-style none; | |
deny bootp; #default | |
authoritative; | |
include "/etc/dhcp/ipxe-option-space.conf"; | |
# GREEN | |
subnet 10.1.1.0 netmask 255.255.255.0 { | |
range 10.1.1.100 10.1.1.199; | |
option subnet-mask 255.255.255.0; |
import ConfigParser, mmap | |
config_file = "/usr/share/applications/google-chrome.desktop" | |
add_string_to_each_section = ["StartupWMClass", "Google-chrome-stable"] | |
option = add_string_to_each_section[0] | |
value = add_string_to_each_section[1] | |
class Fixer: | |
def check(self, cf, option, value): |