At 01:14 PM 11/6/98 -0500, Edward Doolittle wrote:
>
>On Fri, 6 Nov 1998, Marvin George wrote:
>
>> For over 9 months, we have successfully used Linux (RH 5.0) with diald
>> and IP masquerading to put our LAN on the Internet.  Our former ISP used
>> a version of Unix (unknown which one).  We recently switched to a
>> different ISP who uses (UGH!!!) NT.  The dynamically assigned local IP
>> is not present in the output of ifconfig -- it is using the same IP as
>> the ethernet card, which is from the private set of network numbers
>> (192.168.1.x).  When I log on using dip, it works correctly, assigning
>> the dynamic IP to the local (ppp0) interface.  With both dip and diald,
>> the remote IP is correctly assigned. 
>
>So what's the problem?

Diald, according to the documentation I have found, can not use dip.  Dip
requires manual intervention to dial.  Diald can log onto the NT ISP OK,
but will not communicate once pppd is started, I assume due to the
incorrect local IP number.  Diald works great with the old Unix ISP.

>> Also, when logging on with dip, IP masquerading does not work.
>
>Odd.  Where is your IP masquerading set up?  Please post your
>configuration files, output from ifconfig, ipfwadm, etc. so we can see the
>details.

See the end of this message.  (Sorry about the length....)

>> Any ideas about what I might need to change for either diald or IP
>> masquerading?
>
>Umm ... switch to an ISP that uses Unix?  :-)
We hopefully will BE an ISP before too long, and we WILL use Linux.

The ISP we just switched FROM (running Unix) has high prices and terrible
tech support...we have co-located our own RH 5.1 Linux server onto the
premises of the new ISP, but we (and our customers) must still access it
through the ISP's dialup NT-based servers, or from elswhere on the
Internet.  Why does dip pick up the new ISP's dynamically-assigned inet
address, but diald doesn't?  And why does diald pick it up from the old ISP
but not the new one?  Both dip and diald pick up the P-t-P address OK,
regardless of which ISP is being connected to.  I think that, when the inet
address is wrong but the P-t-P address is OK, our Linux box sends out
packets OK but does not respond to received packets at all.

>Ed
Marv (requested info follows)
+++++++++++++++++++
Here's the output of ifconfig (edited to remove some eth0:? aliases) with
diald running, not connected:

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:508 errors:0 dropped:0 overruns:0
          TX packets:508 errors:0 dropped:0 overruns:0

eth0      Link encap:Ethernet  HWaddr 00:20:18:25:18:C9
          inet addr:192.168.1.57  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7981 errors:0 dropped:0 overruns:0
          TX packets:697 errors:0 dropped:0 overruns:0
          Interrupt:9 Base address:0x300 

sl0       Link encap:Serial Line IP  
          inet addr:192.168.1.57  P-t-P:192.168.0.2  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:552  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:8319 errors:0 dropped:0 overruns:0
++++++++++++++++++++
And when connected to the old (Unix) ISP via diald:
++++++++++++++++++++
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:597 errors:0 dropped:0 overruns:0
          TX packets:597 errors:0 dropped:0 overruns:0

eth0      Link encap:Ethernet  HWaddr 00:20:18:25:18:C9
          inet addr:192.168.1.57  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10048 errors:0 dropped:0 overruns:0
          TX packets:1091 errors:0 dropped:0 overruns:0
          Interrupt:9 Base address:0x300 

sl0       Link encap:Serial Line IP  
          inet addr:204.134.118.109  P-t-P:204.134.75.23  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:552  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:10221 errors:0 dropped:0 overruns:0

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:204.134.118.109  P-t-P:204.134.75.23  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:552  Metric:1
          RX packets:144 errors:2 dropped:2 overruns:0
          TX packets:183 errors:0 dropped:0 overruns:0

+++++++++++++++++++++
And via diald to the new (NT) ISP:
+++++++++++++++++++++
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:627 errors:0 dropped:0 overruns:0
          TX packets:627 errors:0 dropped:0 overruns:0

eth0      Link encap:Ethernet  HWaddr 00:20:18:25:18:C9
          inet addr:192.168.1.57  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10164 errors:0 dropped:0 overruns:0
          TX packets:1201 errors:0 dropped:0 overruns:0
          Interrupt:9 Base address:0x300 

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:192.168.1.57  P-t-P:209.181.112.35  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:552  Metric:1
          RX packets:12 errors:1 dropped:1 overruns:0
          TX packets:24 errors:0 dropped:0 overruns:0

sl0       Link encap:Serial Line IP  
          inet addr:192.168.1.57  P-t-P:209.181.112.35  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:552  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0
          TX packets:21 errors:0 dropped:0 overruns:0

++++++++++++++++++++++++
And, finally, when connected via dip to the new ISP:
++++++++++++++++++++++++
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
          RX packets:639 errors:0 dropped:0 overruns:0
          TX packets:639 errors:0 dropped:0 overruns:0

eth0      Link encap:Ethernet  HWaddr 00:20:18:25:18:C9
          inet addr:192.168.1.57  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:10209 errors:0 dropped:0 overruns:0
          TX packets:1241 errors:0 dropped:0 overruns:0
          Interrupt:9 Base address:0x300 

ppp0      Link encap:Point-to-Point Protocol  
          inet addr:209.181.112.82  P-t-P:209.181.112.70  Mask:255.255.255.0
          UP POINTOPOINT RUNNING  MTU:1524  Metric:1
          RX packets:10 errors:0 dropped:0 overruns:0
          TX packets:10 errors:0 dropped:0 overruns:0

----------------
Here's the connect script used by diald.  Note that I have prompt strings,
usernames, and passwords for both ISPs, and comment out the ones for the
ISP which is NOT being called.  (Also note I changed the
usernames/passwords to protect the guilty. :-))

#!/bin/sh
# Copyright (c) 1996, Eric Schenk.
#
# This script is intended to give an example of a connection script that
# uses the "message" facility of diald to communicate progress through
# the dialing process to a diald monitoring program such as dctrl or
diald-top.
# It also reports progress to the system logs. This can be useful if you
# are seeing failed attempts to connect and you want to know when and why
# they are failing.
#
# This script requires the use of chat-1.9 or greater for full
# functionality. It should work with older versions of chat,
# but it will not be able to report the reason for a connection failure.

# Configuration parameters

# The initialization string for your modem

MODEM_INIT="ATZ&C1&D2%C0"

# The phone number to dial
# for cyberport
PHONE_NUMBER="3246500"

# for outerbounds
#PHONE_NUMBER="5648030"

# The chat sequence to recognize that the remote system
# is asking for your user name.
# for cyberport
USER_CHAT_SEQ="name:--name:"

# for outerbounds
#USER_CHAT_SEQ="ogin:--ogin:"

# The string to send in response to the request for your user name.
# for cyberport
USER_NAME="wwwww"

# for outerbounds
#USER_NAME="xxxxx"

# The chat sequence to recongnize that the remote system
# is asking for your password.
PASSWD_CHAT_SEQ="assword:"

# The string to send in response to the request for your password.
# for cyberport
PASSWORD="yyyyy"

# for outerbounds
#PASSWORD="zzzzz"

# The prompt the remote system will give once you are logged in
# If you do not define this then the script will assume that
# there is no command to be issued to start up the remote protocol.
#PROMPT="annex:"
# The command to issue to start up the remote protocol
#PROTOCOL_START="ppp"

# The string to wait for to see that the protocol on the remote
# end started OK. If this is empty then no check will be performed.
#START_ACK="Entering PPP mode."

# Pass a message on to diald and the system logs.
function message () {
[ $FIFO ] && echo "message $*" >$FIFO
logger -p local2.info -t connect "$*"
}

# Initialize the modem. Usually this just resets it.
message "Initializing Modem"
chat TIMEOUT 5 "" $MODEM_INIT OK ATS11=55 TIMEOUT 45 OK ""
if [ $? != 0 ]; then
    message "Failed to initialize modem"
    exit 1
fi

# Dial the remote system.

message "Dialing system"
chat \
        TIMEOUT 75 \
        ABORT "NO CARRIER" \
        ABORT BUSY \
        ABORT "NO DIALTONE" \
        ABORT ERROR \
        "" ATDT$PHONE_NUMBER \
        "CONNECT 115200" ""
case $? in
   0) message Connected;;
   1) message "Chat Error"; exit 1;;
   2) message "Chat Script Error"; exit 1;;
   3) message "Chat Timeout"; exit 1;;
   4) message "No Carrier"; exit 1;;
   5) message "Busy"; exit 1;;
   6) message "No DialTone"; exit 1;;
   7) message "Modem Error"; exit 1;;
   *)
esac

# We're connected try to log in.
message "Logging in"
chat \
        TIMEOUT 5 \
        $USER_CHAT_SEQ \\q$USER_NAME \
        TIMEOUT 45 \
        $PASSWD_CHAT_SEQ $PASSWORD
if [ $? != 0 ]; then
    message "Failed to log in"
    exit 1
fi

# We logged in, try to start up the protocol (provided that the
# user has specified how to do this)

if [ $PROMPT ]; then
    message "Starting Comm Protocol"
    chat TIMEOUT 15 $PROMPT $PROTOCOL_START
    if [ $? != 0 ]; then
        message "Prompt not received"
        exit 1
    fi
fi

if [ $START_ACK ]; then
    chat TIMEOUT 15 $START_ACK ""
    if [ $? != 0 ]; then
        message "Failed to start Protocol"
        exit 1
    fi
fi

# Success!
message "Protocol started"

-----------------------------

The dip script (w/ changed username/password) (this is for the NT ISP; use
same, but with appropriate changes in prompts/username/password for Unix ISP):

#!/usr/sbin/dip
#
# dip script to connect to outerbounds
#

port /dev/modem
speed 115200
reset
flush
send ATQ0V1E1X1\r
wait OK 2
if $errlvl != 0 goto error
send ATS11=55\r
wait OK 2
if $errlvl != 0 goto error
dial 5648030
wait 00 90
if $errlvl != 0 goto error
sleep 3
wait ogin 10
if $errlvl != 0 goto error
send yyyyy\n
wait assword 5
if $errlvl != 0 goto error
send zzzzz\n
wait Mode. 30
if $errlvl != 0 goto error
get $local 0.0.0.0
mode PPP
error:
print failed to connect
quit
---------------------------
ipfwadm rules (loaded by system rc.* startup scripts):

#!/bin/sh
#
# /etc/rc.d/rc.firewall
#
# called from /etc/rc.d/rc.sysinit
#
# 27 mar 98
# Marvin George <[EMAIL PROTECTED]>
#
# tell what's happening
echo $0: Setting firewall rules

# first, flush out any existing rules
ipfwadm -I -f
ipfwadm -O -f
ipfwadm -F -f

# now set default of accept for I & O, deny for F
ipfwadm -I -p accept
ipfwadm -O -p accept
ipfwadm -F -p deny

# and set the rule for masquerading from local net
ipfwadm -F -a masquerade -P all -S 192.168.0.0/16 -D 0.0.0.0/0
ipfwadm -F -a masquerade -P all -S 209.181.112.0/24 -D 0.0.0.0/0
=============================
NOTE: The '-S 209.---' gets changed as appropriate for the ISP being
connected to; for some reason, the above rules don't seem to work with the
NT-based ISP, even with the correct net address in place.  Nor does it work
with the Unix-based ISP when I connect via dip.

Marvin George <[EMAIL PROTECTED]>
----------------------------------------------------
Reach me by ICQ. My ICQ# is 17374743 or,
* Page me online through my Personal Communication Center:
http://wwp.mirabilis.com/17374743 (go there and try it!) or,
* Send me E-mail Express directly to my computer screen
[EMAIL PROTECTED]
For downloading ICQ at http://www.icq.com/
For adding similar signatures to your e-mail go to:
http://www.icq.com/emailsig.html
Marvin George
----------------------------------------------------


-
To unsubscribe from this list: send the line "unsubscribe linux-diald" in
the body of a message to [EMAIL PROTECTED]

Reply via email to