"secure" build now works; moved /usr/lib/cryptobox-cd to /usr/share/cryptonas-live; removed some obsolete files; added gettext to
development build
This commit is contained in:
parent
3ccc72f535
commit
91a0cfb6de
60 changed files with 147 additions and 2581 deletions
55
config/chroot_local-includes/etc/init.d/qemu-ifup
Executable file
55
config/chroot_local-includes/etc/init.d/qemu-ifup
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# this is the qemu-ifup script that should be run at qemu's boot
|
||||
#
|
||||
|
||||
# determine the interface to the outside
|
||||
IF_WORLD=`/sbin/route -n | grep " UG " | sed "s/ */ /g" | cut -d " " -f 8 | head -1`
|
||||
# nothing found? - sorry!
|
||||
[ -z "$IF_WORLD" ] && IF_WORLD=eth0
|
||||
|
||||
|
||||
if [ "$UID" -ne 0 ]
|
||||
then sudo $0 $*
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Laufe als root ..."
|
||||
|
||||
IPT=/sbin/iptables
|
||||
[ ! -x $IPT ] && IPT=/usr/sbin/iptables
|
||||
|
||||
IPT_RULES=" FORWARD -i tun0 -o $IF_WORLD -j ACCEPT
|
||||
FORWARD -i $IF_WORLD -o tun0 -m state --state ESTABLISHED,RELATED -j ACCEPT
|
||||
POSTROUTING -t nat -o $IF_WORLD -j MASQUERADE
|
||||
INPUT -i tun0 -j ACCEPT
|
||||
OUTPUT -o tun0 -j ACCEPT"
|
||||
|
||||
aktiviere_forward()
|
||||
{
|
||||
echo "$IPT_RULES" | while read a
|
||||
do $IPT -A $a
|
||||
done
|
||||
echo 1 >/proc/sys/net/ipv4/ip_forward
|
||||
}
|
||||
|
||||
deaktiviere_forward()
|
||||
{
|
||||
echo "$IPT_RULES" | while read a
|
||||
do $IPT -D $a
|
||||
done
|
||||
echo 0 >/proc/sys/net/ipv4/ip_forward
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
stop )
|
||||
deaktiviere_forward
|
||||
#/etc/init.d/dhcp stop
|
||||
;;
|
||||
* )
|
||||
/sbin/ifconfig $1 192.168.0.1
|
||||
#/etc/init.d/dhcp start
|
||||
aktiviere_forward
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue