#!/bin/bash #Thierry Nkaoua, tous commentaires ou upgrades bienvenus! tnkaoua@yahoo.fr # Etablissement d'une redirection statique vers une machine locale # pour l'utilisation de ip_masq_h323 et netmeeting IFCONFIG=/sbin getip() { IP=`$IFCONFIG/ifconfig ppp0 | fgrep "inet ad" | cut -f2 -d":" | cut -f1 -d" "` } case "$1" in start) getip echo -e "Redirection netmeeting vers IP local" /usr/sbin/ipmasqadm portfw -a -P tcp -L $IP 1720 -R $2 1720 /usr/sbin/ipmasqadm portfw -a -P tcp -L $IP 1503 -R $2 1503 echo -e "Liste des redirections:" ipmasqadm portfw -l ;; stop) echo -e "Arręt redirection netmeeting" /usr/sbin/ipmasqadm portfw -f echo -e "Liste des redirections:" ipmasqadm portfw -l ;; status) echo -e "Liste des redirections:" ipmasqadm portfw -l ;; *) echo "Usage: netmeeting (start ip_local|stop|status)" exit 1 esac exit 0