Next: VPN/IPsec (kx_vpn.sh):
Up: Anhang
Previous: Squid-Proxy (kx_squid.sh):
Contents
#!/bin/sh
# Erstellt die Socks-Client-Konfigurationsdatei
/etc/dante.conf
set $(cat /tmp/ipsub_intern.txt | tr "/"
" ")
IP_INT=$1
SUB_INT=$2
set $(cat /tmp/ipsub_extern.txt | tr "/"
" ")
IP_EXT=$1
SUB_EXT=$2
set $(echo $IP_INT | tr "."
" ")
IP_INT_LAST=$4
IP_INT_LAST_P=`expr $4 + 1` IP_PARTNER=$1.$2.$3.$IP_INT_LAST_P
rm -f /etc/dante.conf
cp /KNOPPIX/etc/dante.conf /etc/
echo "resolveprotocol: udp # default"
> /etc/dante.conf
echo "route {" >>
/etc/dante.conf
echo " from: 0.0.0.0/0 to: 0.0.0.0/0
via: 53.146.187.55 port = 1080" >> /etc/dante.conf
echo " command: bind" >>
/etc/dante.conf
echo "}" >>
/etc/dante.conf
echo "route {" >>
/etc/dante.conf
echo " from: 0.0.0.0/0 to: $IP_PARTNER/32
via: direct" >> /etc/dante.conf echo "}"
>> /etc/dante.conf
echo "route {" >>
/etc/dante.conf
echo " from: 0.0.0.0/0 to: 127.0.0.0/8
via: direct" >> /etc/dante.conf
echo " command: connect udpassociate
# everything but bind, bind confuses us." >>
/etc/dante.conf
echo "}" >>
/etc/dante.conf
echo "route {" >>
/etc/dante.conf
echo " from: 0.0.0.0/0 to: $IP_PARTNER/32
via: direct" >> /etc/dante.conf
echo " command: connect udpassociate
# everything but bind, bind confuses us." >>
/etc/dante.conf
echo "}" >>
/etc/dante.conf
echo "route {" >>
/etc/dante.conf
echo " from: 0.0.0.0/0 to: 0.0.0.0/0
via: $IP_PARTNER port = 1080" >> /etc/dante.conf
echo " protocol: tcp udp # server
supports tcp and udp." >> /etc/dante.conf
echo " proxyprotocol: socks_v5 #
server supports socks v5." >> /etc/dante.conf
echo " method: none #username # we
are willing to authenticate via" >> /etc/dante.conf
echo " # method none, not username."
>> /etc/dante.conf echo "}"
>> /etc/dante.conf
echo "route {" >>
/etc/dante.conf
echo " from: 0.0.0.0/0 to: . via: $IP_PARTNER
port = 1080" >> /etc/dante.conf
echo " protocol: tcp udp # server
supports tcp and udp." >> /etc/dante.conf
echo " proxyprotocol: socks_v5 #
server supports socks v5." >> /etc/dante.conf
echo " method: none #username # we
are willing to authenticate via" >> /etc/dante.conf
echo " # method none, not username."
>> /etc/dante.conf echo "}"
>> /etc/dante.conf
Next: VPN/IPsec (kx_vpn.sh):
Up: Anhang
Previous: Squid-Proxy (kx_squid.sh):
Contents
clumsy
2005-07-21