hi all Sorry I dont have any solution :/ But i just purpose you following the
"iproute" and/or "iproute2" package its a very powerful tool On Sat, 23 Oct 2004 01:53:40 -0700 (PDT) Mike Mestnik <[EMAIL PROTECTED]> wrote: > > --- Michelle Konzack <[EMAIL PROTECTED]> wrote: > > > Am 2004-10-22 10:15:47, schrieb Mike Mestnik: > > > > > Is there a problem with routing the WHOLE subnet? If you where me I'd > > > probly find the subnets assigned by aron and route them all to the > > correct > > > sevice. > > > > curently I have in the Linux-Router > > > > route add <pop-server-ip> gw <isdn-router-ip> > > > Right, try instead... > route add <network used by ISP>/<Network mask> gw <isdn-router-ip> > route add <next network used by ISP>/<Network mask> gw <isdn-router-ip> > route add <another network used by ISP>/<Network mask> gw <isdn-router-ip> > route add <more networks used by ISP>/<Network mask> gw <isdn-router-ip> > > This way not only will the (heavely used) pop server get routed correctly, > but so will the the webservers and gnutella serents :) I would recomend > doing this for every ISP and that ISP's providers(use traceroute) as well. > > 'whois' is a great tool to see who uses what subets and what to use as a > mask. > > > > Also you could use a script to run 'host' on the name and forward the > > > result to iptables, but make sure if the host call fails you provide a > > > descent default. The host cmd could add several minuets to your boot > > up, > > > if your name server is not reachable. > > > > OK, I will use the script option... > > > > __( '/etc/cron.d/pop3smtp_route' )____________________________________ > > / > > | SHELL=/bin/bash > > | PATH=/root/bin:/bin:/sbin:/usr/bin:/usr/sbin > > | > > | 37 * * * * root /root/bin/pop3smtp_route <the_mail_server> > > \______________________________________________________________________ > > > > > > __( '/root/bin/pop3smtp_route' )______________________________________ > > / > > | #!/bin/bash > > | > > | HOSTSTR=`host $1` > > | if [ 'echo $HOSTSTR |grep "has address" ] ; then > > | IP=`echo $HOSTSTR |sed s/^.*has\ address\ //` > # save the last knowed good ip to a file. > echo $HOSTSTR > /root/bin/.pop3smtp_lkgip > > > | else > > > [ -r /root/bin/.pop3smtp_lkgip ] && > IP=$(cat /root/bin/.pop3smtp_lkgip) > [ "$IP" ] || { > IP=209.98.98.98 > rm -f /root/bin/.pop3smtp_lkgip > } > > > But what to use as default ? > > Any suggestions ? > > > > | fi > > | route add $IP gw 192.168.1.125 > > \______________________________________________________________________ > > > One more thing, you should have to clean the output of hosts. You can use > perl, awk, or sed for this. I.E. > > [EMAIL PROTECTED]:~$ host www.yahoo.com > www.yahoo.com is an alias for www.yahoo.akadns.net. > www.yahoo.akadns.net has address 216.109.118.76 > > So something like "awk -e > 's/^.*([0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3}\.[0-9]{1-3})?.*$/\1/'"(not > tested) will do good. >
pgpD65fH2HcW7.pgp
Description: PGP signature