From more information on iodine, read http://code.kryo.se/iodine/README.html
Created
November 14, 2012 19:15
-
-
Save tiefpunkt/4074112 to your computer and use it in GitHub Desktop.
Wrapper shell scripts for iodine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DOMAIN=YOUR.DOMAIN.TLD | |
PASSWORD=YOURPASSWORD | |
ROUTE=/sbin/route | |
IODINE=/usr/sbin/iodine | |
NAMESERVERS=`grep nameserver /etc/resolv.conf | awk '{ print $2 }'` | |
GW=`$ROUTE -n | grep ^0.0.0.0 | awk '{ print $2 }' | head -1` | |
$IODINE -r -P $PASSWORD $DOMAIN | |
for NAMESERVER in $NAMESERVERS | |
do | |
$ROUTE add -net $NAMESERVER netmask 255.255.255.255 gw $GW | |
done | |
$ROUTE add -net 0.0.0.0 netmask 128.0.0.0 gw 172.16.5.1 | |
$ROUTE add -net 128.0.0.0 netmask 128.0.0.0 gw 172.16.5.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
DOMAIN=YOUR.DOMAIN.TLD | |
PASSWORD=YOURPASSWORD | |
IODINED=/usr/sbin/iodined | |
IPTABLES=/sbin/iptables | |
$IPTABLES -t nat -A POSTROUTING -o eth0 -s 172.16.5.0/24 -j MASQUERADE | |
echo 1 > /proc/sys/net/ipv4/ip_forward | |
$IODINED -c -P $PASSWORD 172.16.5.1 $DOMAIN |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment