[SuSE Linux] Diald & IP Masquerade together question (this time in plain text -- sorry)
I have had some luck in setting up IP Masqerade and Diald, but never together. I must be missing a step somewhere. Currently I am using a Webramp M3 analog router, and I love it, but it is only on eval and I can't keep it. Are there any real 'this is how to do it' docs or pages somewhere that explain this for linux user that wants to delve deeper? I am running SuSE 5.2 (impatiently waiting for 5.3), on a p2/233, 64Mb RAM, Netgear 10/100 PCI ethernet. Any pointers would be appreciated. Lloyd lparsons@GlobalEyes.net - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
for those of us who have dedicated dialups, and use "ppp-on" or "pppd" in conjunction with chat or dip to start our connects (can be quite easily modified for other means of automated connection) I wrote this script in a bit of a hurry, I got tired of all these other scripts not working properly, etc... #!/bin/bash # # Short script to keep a connection alive # # Toyzworkz Technologies "We dont make the toyz you buy, we # <A HREF="http://www.toyzworkz.com"><A HREF="http://www.toyzworkz.com</A">http://www.toyzworkz.com</A</A>> make the toyz you buy, broken." # # zens # PPPD_BIN=/usr/sbin/pppd PID_LIST="pppd chat" # Change chat to dip, or whatever, if needed CONTACT_MACHINE=`grep "remote IP address" /var/log/messages \ |awk '{print $9}' |tail -n1` # My pppd upon establishing connect prints the following to my # /var/log/messages file, so in the CONTACT_MACHINE variable above. # I grep and awk and tail out the most recent "remote IP address" # as this would be the most reliable point of contact for testing # a connection to the outside world. If this doesnt work for you # the CONTACT_MACHINE variable below may be more suitable. # # Sep 4 07:25:26 toshiko pppd[1179]: Remote message: Login Succeeded # Sep 4 07:25:26 toshiko pppd[1179]: local IP address 205.253.103.196 # Sep 4 07:25:26 toshiko pppd[1179]: remote IP address 205.164.53.104 # CONTACT_MACHINE=204.71.200.69 # ip for www.yahoo.com replace with # stable ip, leave as is, up to you kill_connect() { for x in $PID_LIST; do ps aux |grep $x |awk '{print $2}' |xargs kill -TERM done } 2>/dev/null check_connect() { if ( ping -c 3 $CONTACT_MACHINE >/dev/null ); then CONNECT_STATUS=0 else CONNECT_STATUS=1 fi echo "Connect status is: $CONNECT_STATUS" } 2>/dev/null connect_action() { if [ $CONNECT_STATUS == 0 ]; then exit 0 elif [ $CONNECT_STATUS == 1 ]; then kill_connect sleep 3 $PPPD_BIN else check_connect fi } 2>/dev/null check_connect connect_action # _EOF_ - To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
I forgot to mention, this was meant to be run via cron :) On Fri, 4 Sep 1998, zens wrote:
for those of us who have dedicated dialups, and use "ppp-on" or "pppd" in conjunction with chat or dip to start our connects (can be quite easily modified for other means of automated connection) I wrote this script in a bit of a hurry, I got tired of all these other scripts not working properly, etc...
#!/bin/bash # # Short script to keep a connection alive # # Toyzworkz Technologies "We dont make the toyz you buy, we # <A HREF="http://www.toyzworkz.com"><A HREF="http://www.toyzworkz.com</A">http://www.toyzworkz.com</A</A>> make the toyz you buy, broken." # # zens #
PPPD_BIN=/usr/sbin/pppd PID_LIST="pppd chat" # Change chat to dip, or whatever, if needed
CONTACT_MACHINE=`grep "remote IP address" /var/log/messages \ |awk '{print $9}' |tail -n1`
# My pppd upon establishing connect prints the following to my # /var/log/messages file, so in the CONTACT_MACHINE variable above. # I grep and awk and tail out the most recent "remote IP address" # as this would be the most reliable point of contact for testing # a connection to the outside world. If this doesnt work for you # the CONTACT_MACHINE variable below may be more suitable. # # Sep 4 07:25:26 toshiko pppd[1179]: Remote message: Login Succeeded # Sep 4 07:25:26 toshiko pppd[1179]: local IP address 205.253.103.196 # Sep 4 07:25:26 toshiko pppd[1179]: remote IP address 205.164.53.104
# CONTACT_MACHINE=204.71.200.69 # ip for www.yahoo.com replace with # stable ip, leave as is, up to you
kill_connect() { for x in $PID_LIST; do ps aux |grep $x |awk '{print $2}' |xargs kill -TERM done } 2>/dev/null
check_connect() { if ( ping -c 3 $CONTACT_MACHINE >/dev/null ); then CONNECT_STATUS=0 else CONNECT_STATUS=1 fi echo "Connect status is: $CONNECT_STATUS" } 2>/dev/null
connect_action() { if [ $CONNECT_STATUS == 0 ]; then exit 0 elif [ $CONNECT_STATUS == 1 ]; then kill_connect sleep 3 $PPPD_BIN else check_connect fi } 2>/dev/null
check_connect connect_action
# _EOF_
- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
- To get out of this list, please send email to majordomo@suse.com with this text in its body: unsubscribe suse-linux-e
participants (2)
-
lparsons@GlobalEyes.net
-
zen@toyzworkz.com