next up previous contents
Next: Quellen Up: Anhang Previous: VPN/IPsec (kx_vpn.sh):   Contents

SSH-Config (kx_ssh.sh):

#!/bin/sh  
# Versuch 6: sshd 

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/ssh/sshd_config  
cp /KNOPPIX/etc/ssh/sshd_config /etc/ssh/  
rm -f /etc/inetd.conf  
cp /KNOPPIX/etc/inetd.conf /etc/ 

echo "ListenAddress $IP_EXT" >> /etc/ssh/sshd_config  
echo "sshd: $IP_PARTNER,192.168.216.254" >> /etc/inetd.conf 



clumsy 2005-07-21