Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
#
# Bash traceback
#
# Because the option “set -o errexit” / "set -e" does not show any message when
# it stops your Bash script in some cases (for example var=$(yourcommand) will
# exit without any message, even when yourcommand returns an exit code
# different from zero), I recommend you to add the code below to your bash scripts
# to show a traceback each time “errexit” forces your Bash script to stop.
#
#!/usr/bin/env /bin/sh
#
# This script uses Linux iptables to route and masquerade ipv4 traffic
# from a network interface to another.
#
# License: MIT
#
# Author: Asher256
# Github: https://github.com/Asher256
# Website: http://www.asher256.com/