Hi everybody,
I'm using diald-0.16.5 on my Redhat 5.1 Linux box
for a couple of months now, and, generally, am quite pleased
with this program. Thanks, Eric !

However, from the very beginning I have noticed one problem
which I would like to nail now. I have attached my diald.conf
and relevant logs of two diald sessions with debug 89 level at
the end of this letter. My standard.filter file is standard, only
few timeouts were increased.
First is the brief description of situation:

Problem:
I have a dial-in connection to (not mine) University department modem server
(in physics.utoronto.ca) which assigns dynamically local and remote IP numbers
during every connection. I want to get telnet connection to a machine
chipmunk.cita.utoronto.ca (128.100.76.49). Now two situations arise

1) chipmunk.cita.utoronto.ca name is resolved before connection established
   either in /etc/hosts or having caching named.
   Diald brings up the link now with TCP synchronization SYN packet.
   Telnet connection is never get established in this case (and, of course
   eventually times out). I shall not that in this case there were
   two queries to both defined nameservers after ppp link was established.

2) chipmunk.cita.utoronto.ca is not resolved in /etc/hosts, nor named caching
   daemon is running. Diald brings up the link on a DNS query and
   everything works fine. Remark: only one query to the nameserver
   happens to be sufficient in this case after ppp link was establsihed.


Now, debug 89 log below shows where the difference manifests itself, but
I don't know how to correct it. The modem connection is established
O'K  and pppd is launched successfully in both cases. The trouble appears
in the syncronization stage after ppp link is established
(I marked this part as D in logs):

If link is brought up as in 1) by SYN packet, further syncronization attempt
continue to be originated from (dummy) IP address 192.168.0.1 and, of course,
no reply from chipmunk.cita.utoronto.ca is received. 

If the link is brought up as in 2) by DNS query,  further syncronization
properly has as its origin the new dynamically assigned IP 
(in the example below 128.100.75.37) and telnet connection succeeds.

I have tried to play with passing to pppd something like 0.0.0.0:0.0.0.0 or
ipcp-accept-local options but the outcome was the same (however, these tests
I should repeat, it was late at night). I'm willing to look into source
some other night, but wanted to check first if there is a known answer.

                                Best regards,
                                Dmitri Pogosyan

                                [EMAIL PROTECTED]

-------------- Transcript of two (1) failed and 2) succesful) sessions --------------
                        Diald was restarted each time
                        Comments are mine

----------------------------------------------------------------------------
root> cat /etc/diald.conf
# Diald configuration file
# Many parameters are overwritten in the command line
# Except last 'include' which sets diald working rules
# Use dummy (local reserved) names for dynamic IP addresses
#
mode ppp
pppd-options noipdefault
connect "/etc/ppp/chat.UoTPhysics"
lock
debug 89
# Serial device
device /dev/ttyS3
speed 115200
modem
crtscts
# Network
mtu 552
mru 552
window 2208
local 192.168.0.1
remote 192.168.0.2
netmask 255.255.255.0
defaultroute
dynamic
#
redial-timeout 10
retry-count 3
#
fifo /etc/ppp/diald.ctl
#
# Filter rules
include /usr/lib/diald/standard.filter

_________________ Preliminaries - some general information ----------- 

128.100.76.49 - machine to which telnet connection is attempted
                by 'telnet chipmunk.cita.utoronto.ca'

128.100.75.99
128.100.75.10 - nameservers in the domain which operates dialin service
                (physics.utoronto.ca)

192.168.0.1   - option 'local'  in diald.conf
192.168.0.2   - option 'remote' in diald.conf

128.100.75.37 - dynamically assigned local address of my machine
128.100.75.15 - dynamically assigned remote address at dialin site

Filtering rules (really standard filter with some changed timeouts):

rule 1 :        accept tcp 120 tcp.syn
rule 22:        accept udp 30 udp.dest=udp.domain
rule 23:        accept udp 30 udp.source=udp.domain

Irrelevant, after telnet session began (if succesfull)
rule 5:         ignore tcp ip.tot_len=40,tcp.live
rule 12:        accept tcp 600 any

===================== 1) Failed attempt of telnet connection =================
root> cat /etc/hosts
127.0.0.1       localhost.localdomain           localhost
128.100.76.49   chipmunk.cita.utoronto.ca       chipmunk
root> telnet chipmunk.cita.utoronto.ca
Trying 128.100.76.49...

---------- Diald session:  A) New diald launched and initialized --------------------
diald[5669]: Starting diald version 0.16.5
diald[5669]: Proxy device established on interface sl0
diald[5669]: running '/sbin/ifconfig sl0 192.168.0.1 pointopoint 192.168.0.2 
             netmask 255.255.255.0 mtu 552 up'
diald[5669]: SIGCHLD[1]: pid 5670 system, status 0
diald[5669]: Setting pointopoint route for sl0
diald[5669]: running '/sbin/route add 192.168.0.2 metric 1 window 2208 dev sl0'
diald[5669]: SIGCHLD[2]: pid 5672 system, status 0
diald[5669]: Establishing routes for sl0
diald[5669]: running '/sbin/route add default metric 1 window 2208 netmask 0.0.0.0 dev 
sl0'
diald[5669]: SIGCHLD[3]: pid 5673 system, status 0
diald[5669]: Changed snoop device to sl0
diald[5669]: Diald initial setup completed.
----------- B) SYN packet arrives, modem dial, chat and connection, pppd launched 
------
diald[5669]: filter accepted rule 1 proto 6 len 44 seq 13111a78 ack 0 flags 
             SYN packet 192.168.0.1,1200 => 128.100.76.49,23
diald[5669]: Adding connection 0x805d050 @ 909469419 - timeout 120
diald[5669]: new state CONNECT action 0x804ee14 timeout 60
diald[5669]: Running connect (pid = 5675).
diald[5669]: filter accepted rule 1 proto 6 len 44 seq 13111a78 ack 0 flags 
             SYN packet 192.168.0.1,1200 => 128.100.76.49,23
diald[5669]: Adding connection 0x805d050 @ 909469422 - timeout 120
diald[5669]: filter accepted rule 1 proto 6 len 44 seq 13111a78 ack 0 flags 
             SYN packet 192.168.0.1,1200 => 128.100.76.49,23
diald[5669]: Adding connection 0x805d050 @ 909469428 - timeout 120
diald[5669]: filter accepted rule 1 proto 6 len 44 seq 13111a78 ack 0 flags 
             SYN packet 192.168.0.1,1200 => 128.100.76.49,23
diald[5669]: Adding connection 0x805d050 @ 909469440 - timeout 120
diald[5669]: SIGCHLD[4]: pid 5675 dial, status 0
diald[5669]: new state START_LINK action 0x804f0cc timeout 60
diald[5669]: Running pppd (pid = 5676).
diald[5676]: Running pppd: /usr/sbin/pppd -detach modem crtscts mtu 552 mru 552 
                netmask 255.255.255.0 debug noipdefault 
diald[5669]: filter accepted rule 22 proto 17 len 70 packet 192.168.0.1,1272 => 
128.100.75.99,53
diald[5669]: Adding connection 0x805d9e8 @ 909469451 - timeout 30
diald[5669]: New addresses: local 128.100.75.37, remote 128.100.75.15.
diald[5669]: Setting pointopoint route for ppp0
diald[5669]: running '/sbin/route add 128.100.75.15 metric 0 window 2208 dev ppp0'
diald[5669]: SIGCHLD[5]: pid 5686 system, status 0
diald[5669]: Establishing routes for ppp0
diald[5669]: running '/sbin/route add default metric 0 window 2208 netmask 0.0.0.0 dev 
ppp0'
diald[5669]: SIGCHLD[6]: pid 5687 system, status 0
diald[5669]: new state UP action 0x804f1cc timeout 120
diald[5669]: Changed snoop device to ppp0
----------- C) some exchange with nameservers (to BOTH nameserves ) 
-------------------------
diald[5669]: filter accepted rule 22 proto 17 len 70 packet 128.100.75.37,1273 => 
128.100.75.10,53
diald[5669]: Adding connection 0x805d9e8 @ 909469456 - timeout 30
diald[5669]: filter accepted rule 23 proto 17 len 152 packet 128.100.75.10,53 => 
128.100.75.37,1273
diald[5669]: Adding connection 0x805d9e8 @ 909469456 - timeout 30
diald[5669]: filter accepted rule 22 proto 17 len 72 packet 128.100.75.37,1274 => 
128.100.75.99,53
diald[5669]: Adding connection 0x805d050 @ 909469456 - timeout 30
diald[5669]: filter accepted rule 23 proto 17 len 495 packet 128.100.75.99,53 => 
128.100.75.37,1274
diald[5669]: Adding connection 0x805d050 @ 909469456 - timeout 30
----------- D) TROUBLESOME PART - attempt of syncronization with no reply ------------
-----------     NOTICE 192.168.0.1 as origin of SYN packet 
-----------------------------
diald[5669]: filter accepted rule 1 proto 6 len 44 seq 13111a78 ack 0 flags  
                SYN packet 192.168.0.1,1200 => 128.100.76.49,23
diald[5669]: Adding connection 0x805fec0 @ 909469464 - timeout 120
diald[5669]: Deleting connection 0x805d9e8 @ 909469486
diald[5669]: Deleting connection 0x805d050 @ 909469486
diald[5669]: filter accepted rule 1 proto 6 len 44 seq 13111a78 ack 0 flags  
                SYN packet 192.168.0.1,1200 => 128.100.76.49,23
diald[5669]: Adding connection 0x805fec0 @ 909469512 - timeout 120
diald[5669]: filter accepted rule 1 proto 6 len 44 seq 13111a78 ack 0 flags  
                SYN packet 192.168.0.1,1200 => 128.100.76.49,23
diald[5669]: Adding connection 0x805fec0 @ 909469608 - timeout 120
diald[5669]: Deleting connection 0x805fec0 @ 909469728

...... telnet timed out here
------------E) Closing down the link -------------------------------------------------
diald[5669]: Closing down idle link.    
                        ....................


============== 1) Successfull attempt of telnet connection 
=============================
root> cat /etc/hosts
127.0.0.1       localhost.localdomain           localhost
root> telnet chipmunk.cita.utoronto.ca

---------- Diald session:  A) initialization --------------------
diald[5743]: Starting diald version 0.16.5
diald[5743]: Proxy device established on interface sl0
diald[5743]: running '/sbin/ifconfig sl0 192.168.0.1 pointopoint 192.168.0.2
             netmask 255.255.255.0 mtu 552 up'
diald[5743]: SIGCHLD[1]: pid 5744 system, status 0
diald[5743]: Setting pointopoint route for sl0
diald[5743]: running '/sbin/route add 192.168.0.2 metric 1 window 2208 dev sl0'
diald[5743]: SIGCHLD[2]: pid 5750 system, status 0
diald[5743]: Establishing routes for sl0
diald[5743]: running '/sbin/route add default metric 1 window 2208 netmask 0.0.0.0 dev 
sl0'
diald[5743]: SIGCHLD[3]: pid 5751 system, status 0
diald[5743]: Changed snoop device to sl0
diald[5743]: Diald initial setup completed.
------------B) DNS query packet arrives, modem dials, chat and ppp connection 
---------------
diald[5743]: filter accepted rule 22 proto 17 len 71 packet 192.168.0.1,1276 => 
128.100.75.99,53
diald[5743]: Adding connection 0x805d050 @ 909469873 - timeout 30
diald[5743]: new state CONNECT action 0x804ee14 timeout 60
diald[5743]: Running connect (pid = 5753).
diald[5743]: filter accepted rule 22 proto 17 len 71 packet 192.168.0.1,1277 => 
128.100.75.10,53
diald[5743]: Adding connection 0x805d9e8 @ 909469878 - timeout 30
diald[5743]: filter accepted rule 22 proto 17 len 71 packet 192.168.0.1,1280 => 
128.100.75.99,53
diald[5743]: Adding connection 0x805fec0 @ 909469883 - timeout 30
diald[5743]: filter accepted rule 22 proto 17 len 71 packet 192.168.0.1,1283 => 
128.100.75.10,53
diald[5743]: Adding connection 0x805ff08 @ 909469888 - timeout 30
diald[5743]: filter accepted rule 22 proto 17 len 71 packet 192.168.0.1,1284 => 
128.100.75.99,53
diald[5743]: Adding connection 0x805ff50 @ 909469893 - timeout 30
diald[5743]: SIGCHLD[4]: pid 5753 dial, status 0
diald[5743]: new state START_LINK action 0x804f0cc timeout 60
diald[5743]: Running pppd (pid = 5754).
diald[5754]: Running pppd: /usr/sbin/pppd -detach modem crtscts mtu 552 mru 552 
                netmask 255.255.255.0 debug noipdefault 
diald[5743]: filter accepted rule 22 proto 17 len 70 packet 192.168.0.1,1287 => 
128.100.75.99,53
diald[5743]: Adding connection 0x805ff98 @ 909469902 - timeout 30
diald[5743]: New addresses: local 128.100.75.37, remote 128.100.75.15.
diald[5743]: Setting pointopoint route for ppp0
diald[5743]: running '/sbin/route add 128.100.75.15 metric 0 window 2208 dev ppp0'
diald[5743]: SIGCHLD[5]: pid 5764 system, status 0
diald[5743]: Establishing routes for ppp0
diald[5743]: running '/sbin/route add default metric 0 window 2208 netmask 0.0.0.0 dev 
ppp0'
diald[5743]: SIGCHLD[6]: pid 5765 system, status 0
diald[5743]: new state UP action 0x804f1cc timeout 120
diald[5743]: Changed snoop device to ppp0
----------- C) some exchange with nameservers (ONLY ONE EXCHANGE) 
------------------------------
diald[5743]: filter accepted rule 22 proto 17 len 71 packet 128.100.75.37,1288 => 
128.100.75.10,53
diald[5743]: Adding connection 0x805d9e8 @ 909469903 - timeout 30
diald[5743]: filter accepted rule 23 proto 17 len 372 packet 128.100.75.10,53 => 
128.100.75.37,1288
diald[5743]: Adding connection 0x805d9e8 @ 909469903 - timeout 30
----------- D) Syncronization part - GOT REPLY, WORKED FINE ! 
--------------------------------------
diald[5743]: filter accepted rule 1 proto 6 len 44 seq 4829a757 ack 0 flags 
                SYN packet 128.100.75.37,1202 => 128.100.76.49,23
diald[5743]: Adding connection 0x805d050 @ 909469903 - timeout 120
diald[5743]: filter accepted rule 1 proto 6 len 44 seq 41569000 ack 4829a758 flags
                SYN ACK packet 128.100.76.49,23 => 128.100.75.37,1202
diald[5743]: Adding connection 0x805d050 @ 909469903 - timeout 120
----------- E) telnet session begins 
----------------------------------------------------
diald[5743]: filter ignored rule 5 proto 6 len 40 seq 4829a758 ack 41569001 flags  ACK 
packet 128.100.75.37,1202 => 128.100.76.49,23
diald[5743]: filter accepted rule 12 proto 6 len 67 seq 4829a758 ack 41569001 flags  
PUSH ACK packet 128.100.75.37,1202 => 128.100.76.49,23
diald[5743]: Adding connection 0x805d050 @ 909469903 - timeout 600
diald[5743]: filter ignored rule 5 proto 6 len 40 seq 41569001 ack 4829a773 flags  ACK 
packet 128.100.76.49,23 => 128.100.75.37,1202
diald[5743]: filter accepted rule 12 proto 6 len 43 seq 41569001 ack 4829a773 flags  
PUSH ACK packet 128.100.76.49,23 => 128.100.75.37,1202
diald[5743]: Adding connection 0x805d050 @ 909469903 - timeout 600

etc. telnet connection established

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

Reply via email to