Skip to content

Instantly share code, notes, and snippets.

View kakbit's full-sized avatar

Patric Buskas kakbit

  • Kakbit AB
  • Sweden
View GitHub Profile
sudo iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
Chain FORWARD (policy ACCEPT)
target prot opt source destination
route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.2.1 0.0.0.0 UG 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.109.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet8
192.168.194.0 0.0.0.0 255.255.255.0 U 0 0 0 vmnet1
192.168.200.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr1
virsh net-dumpxml nw200
<network>
<name>nw200</name>
<uuid>974cdf9b-e8cd-5cca-0bd1-18458a9c49c4</uuid>
<forward mode='route'/>
<bridge name='virbr1' stp='on' delay='0' />
<mac address='52:54:00:2B:9F:EE'/>
<ip address='192.168.200.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.200.128' end='192.168.200.254' />
@kakbit
kakbit / gist:7039035
Created October 18, 2013 09:32
Ansible YAML syntax error
ERROR: Syntax Error while loading YAML script, /path/to/ansible_play/roles/client/tasks/main.yml
Note: The error may actually appear before this position: line 9, column 31
with_fileglob:
- {{ inventory_hostname }}/*.conf
^
@kakbit
kakbit / gist:6559806
Created September 14, 2013 08:02
Ansible error
[patric@graphite01 ansible]$ ansible --version
Traceback (most recent call last):
File "/usr/bin/ansible", line 24, in <module>
from ansible.runner import Runner
File "/usr/lib/python2.6/site-packages/ansible/runner/__init__.py", line 50, in <module>
from Crypto.Random import atfork
File "/usr/lib64/python2.6/site-packages/Crypto/Random/__init__.py", line 29, in <module>
from Crypto.Random import _UserFriendlyRNG
File "/usr/lib64/python2.6/site-packages/Crypto/Random/_UserFriendlyRNG.py", line 38, in <module>
from Crypto.Random.Fortuna import FortunaAccumulator
@kakbit
kakbit / gist:6192679
Created August 9, 2013 10:30
My kibanatest apache conf
<VirtualHost *:80>
ServerName kibanatest.buskas.org
ServerAlias kibanatest.buskas.org
Use logstash_log kibanatest.buskas.org kibanatest.buskas.org
DocumentRoot "/var/www/kibana3"
# Elasticsearch API is behind /es/
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK|OPTIONS|DELETE)
RewriteRule .* - [F]
RewriteCond %{LA-U:REMOTE_USER} !^$