r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[Rebol School] Rebol School

Anton
30-Oct-2008
[812]
... ah yes it's router problem.
Port forwarding for FTP maybe missing some ports?
Vladimir
30-Oct-2008
[813x2]
I have these settings in ruter conf:
HOST IP
ROUTING
VIRTUAL SERVER
CUSTOM VIRTUAL SERVER
SPECIAL APPLICATION
DYNAMIC DNS
MULTI DMZ
UPNP
NAT
ADVANCED FEATURE
Where should I check ports and which ports?

how can it work from command prompt with ftp command, from total 
commander and not from rebol script?
Pekr
30-Oct-2008
[815]
Vladimir - upload your device PDF docs anywhere - if there are any 
... it could be hidden in special application menu, multi DMZ, NAT, 
or ADVANCED FEATURES ...
Vladimir
31-Oct-2008
[816]
There you go:

http://www.2shared.com/file/4192455/b9f6ca7d/LB_Manual_1_1.html

Sugestions are welcome :)
Pekr
1-Nov-2008
[817x5]
First - it seems you could try making your PC a DMZ PC, then your 
PC will not be shielded by firewall ....
As for your load balancer device - do you use two WANs connected 
to two providers? If so, you have to choose session balancing type, 
or some of your apps might not work (e.g. ICQ will disconnect you, 
when you go out via two different public IPs in one session)
Look at Access filter, and see if all traffic is enabled, and no 
services (represented by port numbers) are selectively disabled ...
Look at Virtual servers - do you run FTP server in your LAN? If so, 
disallow it for a while. (this will most probabyl not help though)
I went thru all the docs, and nothing suspicious in there. As your 
Total Commander FTP connection works, it has to be REBOL in conjunction 
with your local PC firewall or something like that. Or REBOL ftp 
protocol working differentcly could be the cause, but not sure, as 
it works from other locations ...
Vladimir
2-Nov-2008
[822]
Hey... thanks for bothering with my problem....  :)

I will go tomorrow in to the office and try few things... in the 
meantime they are just using totalcmd for uploading data...

I will be using two wans... but not yet... its still only one wan 
connection.
No more talk.... I'll try tomorrow...

My friends are telling me: "If everything else works it has to be 
that scripting language of yours."

I say: fuc..ing router should act as a simple wire... what goes in 
on one end goes out on other end.
I can change router... BUT I'M NOT CHANGING LANGUAGE! :)
I will report progress tomorrow.
Gabriele
2-Nov-2008
[823]
did you try both active and passive ftp?
Graham
2-Nov-2008
[824x2]
he tried both
and it works for us using his password :)
Vladimir
2-Nov-2008
[826x5]
yes :)
only problem is router.... without it if I connect directly PC with 
WAN connection... rebol scripts work...

I connect router on wan and pc on lan port and only rebol script 
doesnt work...
filezilla, total commander, ftp command from windows works...
I know (at least I thought I knew...  :( ) how to set up network 
and routers... I did this hundreds of times, and had problems with 
altme, torrent downloaders, games and many others... and solved them....

I tried to add ftp ports, and even whole range from 0-65535 to NAT 
routing tables.... tried to put whole lan ip range into dmz... Ill 
try tomorrow....
While Im at this... Does anyone know how ftp works from rebol ?
Details about ftp imlementation in rebol ?
Pavel
2-Nov-2008
[831x2]
Vladimir look at rebol.org script folder. there you can find a lot 
of solution/inspiration
also rebol.com documentation tutorial and examples especially rebol 
cookbook
Graham
2-Nov-2008
[833]
the source to ftp is available
Pekr
2-Nov-2008
[834]
Vladimir - you still probably did not tell us, what REBOL version 
do you use?
Vladimir
2-Nov-2008
[835x2]
I use 2.7.6 on windows.
@Graham: Where is the source available?

I thought maybe by looking into source and comparing it with the 
messages I get from net stats I could find more about my problem....

In the meantime I'll try tomorrow to open router completely... all 
the ports all the ip addresses... and see what happens.
Graham
2-Nov-2008
[837]
probe system/schemes/ftp
Vladimir
4-Nov-2008
[838x4]
here is something new....
I tried few things from windows command line.
here are two scripts and two logs:
1. script
binary
cd apl
put c:\slanje\zip\ik104test.zip
quit

1.log
......
230-User visaprom.com has group access to:  www
230 OK. Current restricted directory is /
ftp> binary
200 TYPE is now 8-bit binary
ftp> cd apl
250 OK. Current directory is /apl
ftp> put c:\slanje\zip\ik104test.zip
200 PORT command successful

425 Could not open data connection to port 35370: Operation timed 
out
ftp> quit
221-Goodbye. You uploaded 0 and downloaded 0 kbytes.
221 Logout.
2.script
LITERAL PASV
cd apl
put c:\slanje\zip\ik104test.zip
quit

2.log
.....
230-User visaprom.com has group access to:  www
230 OK. Current restricted directory is /
ftp> LITERAL PASV
227 Entering Passive Mode (194,9,94,127,234,131)
ftp> cd apl
Connection closed by remote host.
ftp> put c:\slanje\zip\ik104test.zip
Not connected.
ftp> quit
basicly if I enter Binary mode, upload fails and it looks like it 
has to do something with port above 35000 problem.
If I enter passive mode nothing works....
it always responds with network timeout....
And once more..... total commander works :)
Graham
4-Nov-2008
[842]
well, in this case, you should use wireshark and do a tcp trace
Vladimir
4-Nov-2008
[843x3]
Im trying..... will report
here is command with error:
to-port: open/binary/new/direct server/:file
** Access Error: Network timeout
** Where: confirm
** Near: to-port: open/binary/new/direct server/:file
and here are log files from wireshark:

http://www.visaprom.com/wiresharklog.txt
http://www.visaprom.com/wiresharklog details.txt


If anyone has little time to read thru them and can tell me something 
I would appriciate it very much :)
Graham
4-Nov-2008
[846]
what I normally do is click on the relevant tcp lines, and the right 
click, and then choose "follow tcp stream" so that I only get the 
relevant data.
DideC
4-Nov-2008
[847]
It seems the problem is after the PORT command.

It  define the port used to receive or send the file data (depending 
the command you issue).

Use Wireshark to have a look to what Total commander do regarding 
its PORT command.
So we can compare with the Rebol commands.


I guess the router firewall block the one Rebol use, but Total commander 
do it in an over way.
Vladimir
5-Nov-2008
[848x2]
Here is log from rebol ftp upload:


No.     Time        Source                Destination           Protocol 
Info

     67 3.356898    192.168.2.108         194.9.94.127          TCP   
        spiral-admin > ftp [SYN] Seq=0 Win=16384 Len=0 MSS=1460

     79 3.982028    194.9.94.127          192.168.2.108         TCP   
        ftp > spiral-admin [SYN, ACK] Seq=0 Ack=1 Win=16384 Len=0 MSS=1100

     80 3.982082    192.168.2.108         194.9.94.127          TCP   
        spiral-admin > ftp [ACK] Seq=1 Ack=1 Win=16500 Len=0

     90 4.056926    194.9.94.127          192.168.2.108         FTP   
        Response: 220---------- Welcome to Pure-FTPd [privsep] [TLS] ----------

     92 4.057544    192.168.2.108         194.9.94.127          FTP   
        Request: USER visaprom.com

    102 4.129540    194.9.94.127          192.168.2.108         FTP  
        Response: 331 User visaprom.com OK. Password required

    103 4.129689    192.168.2.108         194.9.94.127          FTP  
        Request: PASS Du4m1t0R

    106 4.241608    194.9.94.127          192.168.2.108         FTP  
        Response: 230-User visaprom.com has group access to:  www    
     

    107 4.241781    192.168.2.108         194.9.94.127          FTP  
        Request: SYST

    118 4.305921    194.9.94.127          192.168.2.108         FTP  
        Response: 215 UNIX Type: L8

    119 4.306117    192.168.2.108         194.9.94.127          FTP  
        Request: PWD

    134 4.367656    194.9.94.127          192.168.2.108         FTP  
        Response: 257 "/" is your current location

    136 4.370939    192.168.2.108         194.9.94.127          FTP  
        Request: PORT 192,168,2,108,13,111

    143 4.435976    194.9.94.127          192.168.2.108         FTP  
        Response: 200 PORT command successful

    144 4.468135    192.168.2.108         194.9.94.127          FTP  
        Request: CWD apl/

    194 5.499179    192.168.2.108         194.9.94.127          FTP  
        [TCP Retransmission] Request: CWD apl/

    198 5.565745    194.9.94.127          192.168.2.108         FTP  
        Response: 250 OK. Current directory is /apl

    199 5.565955    192.168.2.108         194.9.94.127          FTP  
        Request: TYPE I

    275 7.640872    194.9.94.127          192.168.2.108         FTP  
        Response: 200 TYPE is now 8-bit binary

    276 7.641186    192.168.2.108         194.9.94.127          FTP  
        Request: STOR ik104test.zip

    290 7.903130    194.9.94.127          192.168.2.108         TCP  
        ftp > spiral-admin [ACK] Seq=613 Ack=111 Win=16500 Len=0

   1279 37.655879   192.168.2.108         194.9.94.127          TCP 
        spiral-admin > ftp [FIN, ACK] Seq=111 Ack=613 Win=15888 Len=0
there goes pass again :)
Henrik
5-Nov-2008
[850]
Vladimir, be careful as this group is web public.
Vladimir
5-Nov-2008
[851x5]
I know .. Im to tired :)
no problem... will change it in a sek...
Ill post log from total commander in a minute and then try to spot 
the difference...
No.     Time        Source                Destination           Protocol 
Info

     90 2.750586    192.168.2.108         194.9.94.127          FTP   
        Request: TYPE I

     97 2.823074    194.9.94.127          192.168.2.108         FTP   
        Response: 200 TYPE is now 8-bit binary

     98 2.828500    192.168.2.108         194.9.94.127          FTP   
        Request: PASV

    113 3.171841    192.168.2.108         194.9.94.127          FTP  
        [TCP Retransmission] Request: PASV

    114 3.244193    194.9.94.127          192.168.2.108         TCP  
        [TCP Previous segment lost] ftp > mgemanagement [ACK] Seq=80 
    Ack=15 Win=16500 Len=0

    131 3.889034    194.9.94.127          192.168.2.108         FTP  
        [TCP Retransmission] Response: 227 Entering Passive Mode (194,9,94,127,250,69)

    137 3.984887    192.168.2.108         194.9.94.127          FTP  
        Request: STOR ik104test.zip

    149 4.247163    194.9.94.127          192.168.2.108         TCP  
        ftp > mgemanagement [ACK] Seq=80 Ack=35 Win=16500 Len=0

    210 7.046287    194.9.94.127          192.168.2.108         FTP  
        Response: 150 Accepted data connection

    241 7.218716    192.168.2.108         194.9.94.127          TCP  
        mgemanagement > ftp [ACK] Seq=35 Ack=110 Win=16269 Len=0

   1613 17.145048   194.9.94.127          192.168.2.108         FTP 
        Response: 226-File successfully transferred

   1617 17.172970   192.168.2.108         194.9.94.127          FTP 
        Request: SIZE ik104test.zip

   1620 17.277591   194.9.94.127          192.168.2.108         FTP 
        Response: 213 566605

   1623 17.375906   192.168.2.108         194.9.94.127          FTP 
        Request: TYPE A

   1628 17.498619   194.9.94.127          192.168.2.108         FTP 
        Response: 200 TYPE is now ASCII

   1629 17.516657   192.168.2.108         194.9.94.127          FTP 
        Request: PASV

   1633 17.644044   194.9.94.127          192.168.2.108         FTP 
        Response: 227 Entering Passive Mode (194,9,94,127,205,237)

   1637 17.750889   192.168.2.108         194.9.94.127          FTP 
        Request: LIST

   1643 17.835367   194.9.94.127          192.168.2.108         FTP 
        Response: 150 Accepted data connection

   1644 17.863490   194.9.94.127          192.168.2.108         FTP 
        Response: 226-Options: -a -l 

   1645 17.863548   192.168.2.108         194.9.94.127          TCP 
        mgemanagement > ftp [ACK] Seq=75 Ack=364 Win=16015 Len=0
there it is.... difference is:

in total cmd:
on Request: STOR ik104test.zip
ftp > mgemanagement [ACK] Seq=80 Ack=35 Win=16500 Len=0
Response: 150 Accepted data connection

and in rebol
response is

 290 7.903130    194.9.94.127          192.168.2.108         TCP  
     ftp > spiral-admin [ACK] Seq=613 Ack=111 Win=16500 Len=0
30 seconds pause

1279 37.655879   192.168.2.108         194.9.94.127          TCP 
     spiral-admin > ftp [FIN, ACK] Seq=111 Ack=613 Win=15888 Len=0 
   149 4.247163    194.9.94.127          192.168.2.108         TCP
Anton
5-Nov-2008
[856]
I note in the "wireshark log.txt" you linked above, there is [TCP 
CHECKSUM INCORRECT] soon after the STOR command. I don't know what 
it means exactly.
Pekr
5-Nov-2008
[857]
FIN, ACK - your PC closes the connection (REBOL version) after receiving 
previous ACK, dunno why. Why is "spiral-admin" btw?
Dockimbel
5-Nov-2008
[858]
Your REBOL FTP session doesn't seem to use passive mode while Total 
Cmd does.
Pekr
5-Nov-2008
[859]
I think we several times suggested to set system/schemes/ftp/passive: 
true, and IIRC Vladimir claimed that it made no change for him ....
Vladimir
5-Nov-2008
[860x2]
I set it to passive
same error.... here is the log