Skip to content

Instantly share code, notes, and snippets.

@isuldor
isuldor / openwrt.rules
Created April 2, 2016 22:51
The default iptables ruleset in OpenWrt
# Generated by iptables-save v1.4.21 on Sun Mar 20 20:06:57 2016
*nat
:PREROUTING ACCEPT [181:25653]
:INPUT ACCEPT [1:60]
:OUTPUT ACCEPT [29:1972]
:POSTROUTING ACCEPT [29:1972]
:postrouting_lan_rule - [0:0]
:postrouting_rule - [0:0]
:postrouting_wan_rule - [0:0]
:prerouting_lan_rule - [0:0]
@isuldor
isuldor / auto-vnc.sh
Created April 2, 2016 21:46
Lazy VNC connection script
#!/bin/bash
# Connect to the actual X desktop session of another machine
# x0vncserver is included with TigerVNC
DESKTOP=10.10.10.10
if ! nc -nvz ${DESKTOP} 5900; then
ssh ${DESKTOP} 'x0vncserver -MaxDisconnectionTime=120 -Display :0 -PasswordFile ~/.vnc/passwd' &
sleep 1
fi
vncviewer DotWhenNoCursor=1 ${DESKTOP}