Skip to content

Instantly share code, notes, and snippets.

View mambrus's full-sized avatar

Michael Ambrus mambrus

View GitHub Profile

Keybase proof

I hereby claim:

  • I am mambrus on github.
  • I am mambrus (https://keybase.io/mambrus) on keybase.
  • I have a public key ASAgtkC7XqU-K44JDqF2lD5fQD85fF4De-25kJfmjkcOuQo

To claim this, I am signing this object:

@mambrus
mambrus / set_routes.sh
Last active December 28, 2015 15:19
Part II of network scripts. Back-routing behing FW
#! /bin/bash
IFNAME=${1}
NIC_IPNR=$(ifconfig | \
grep $IFNAME -A3 | \
grep "inet addr" | \
cut -f2 -d":" | \
cut -f1 -d " ")
LNET=$(echo $NIC_IPNR | cut -f1-3 -d".").0
@mambrus
mambrus / dyndns_update.sh
Last active December 28, 2015 14:29
Scripts for updateing dyn-DNS from fredns.afraid.org either manualy or via cron.
#! /bin/bash
# This script updates a dynamic-DNS record for a specific NIC of your host.
# Script is made for freedns.afraid.org but should in principle work for
# other providers as well that allow DNS updates by simply loading a
# specific URL.
#
# Usage: dyndns_update.sh IF SHA1
#
# As this script is meant to be run from cron, it will be fairly silent,
# except when something goes wrong in an unexpected way or when a change of