Sponsored Content
Full Discussion: FTP script not working
Top Forums Shell Programming and Scripting FTP script not working Post 302999427 by hicksd8 on Tuesday 20th of June 2017 04:24:40 AM
Old 06-20-2017
What OS's are the client and server?

Has the network topology changed at all concurrent with the change of ip address?

I would be thinking that somewhere on the route the required payload is not allowed. Connecting the FTP session is achieved with quite small packets but as soon as you attempt to do anything else, the payload will radically increase. If devices have different maximum payloads configured then packets are denied, ie, lost. Timeout would result. I also wonder whether one device is trying to open a different port at that point which is denied.

I'm still thinking about this one. Strange!

---------- Post updated at 09:24 AM ---------- Previous update was at 09:20 AM ----------

Using PASV as suggested by rbatte1 is the most common resolution of such problems but the ports used in passive mode need to be open too.

Are you using the native ftp client and server implementations from your OS's? Or are you using a third party variant?

Last edited by hicksd8; 06-20-2017 at 05:34 AM..
These 2 Users Gave Thanks to hicksd8 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

mput is not working in ftp script

1)In this script mput command is not working( not transfering multiple files, it is able to send single file) 2)here is the script to automate the ftp process . 3)for transfering files from one machine to other machine using ftp can anyone can give me the solution in this issue Script is... (6 Replies)
Discussion started by: gsri
6 Replies

2. Shell Programming and Scripting

FTP script not working

hi I have made d below ftp script but the last part of script ie. moving the files after transfer (to a location in the source server only) is not working for me. Can anybody pls..help.in same..!!! ####################################################### #!/bin/sh ftp -n 10.209.13.11... (2 Replies)
Discussion started by: rookie250
2 Replies

3. Cybersecurity

FTP is not working.

Hi, I'm getting the following error while trying to use the ftp command. ---------------- 331 Password required for prodofsa. Password: 230 User prodofsa logged in. ftp> ftp> ftp> ftp> ls 200 PORT command successful. 425 Can't build data connection: Connection timed out. ftp>... (10 Replies)
Discussion started by: ronald_brayan
10 Replies

4. Shell Programming and Scripting

ftp in shell script is not working

Hi All, I have writtern a shell script which has a sql query. I want to send the results of sql query to a shared area over a network.I also want to log the errors in a log file if the text file is not sent to shared area. The results of sql query are spooled in TEMPFILE. LOGFILE... (1 Reply)
Discussion started by: nsachin
1 Replies

5. UNIX for Advanced & Expert Users

Unix FTP Script connecting through proxy Not working

Hi All, can some one please help me to solve this issue, its urgent:confused: We need to FTP a file form our Unix server to an external client FTP location. I am trying to connect to the proxy server first and then use the below USER comment to connect to the external FTP server, and its working... (3 Replies)
Discussion started by: JesusJoseph
3 Replies

6. Linux

FTP not working under Linux but working under any other OS ??? Very strange

Dear all, I am totally despaired and puzzled. Using Filezilla under Windows under the same network as our Linux servers is working. Using FTP command-line client under any of our Linux debian servers is not working ! I tried with different FTP servers -> same problem ! All commands are... (12 Replies)
Discussion started by: magix_ch
12 Replies

7. Shell Programming and Scripting

bash script for ftp-upload is not working

Hello everyone, sorry for the title, most of you must getting sick of reading something like this, but I haven't found a solution, although I found many threads according to it. I'm working on a bash script that connects to a network printer with ftp where I want to upload a pdf created... (3 Replies)
Discussion started by: le_mae
3 Replies

8. Shell Programming and Scripting

Script not working after FTP

Hi Gurus, I prepared a script to process some files and then ftp the output file to mainframe directory. Here is the code snippet for the same. # Perform FTP echo "put $TGT_DR/$K.$F.$I.$K1.$RUN_TYPE '$K.$F.$I.$K1.$RUN_TYPE'" >> $LogFile ftp -i -n <<EOF >> $LogFile open... (2 Replies)
Discussion started by: svajhala
2 Replies

9. Shell Programming and Scripting

FTP using script not working (for transfering file from a remote unix server to windows PC.)

hi, Im using the following code for FTP #!/usr/bin/ksh ftp -v -n "10.29.45.11" << cmd user "mahesva" "mahesva123" get rtl.tar quit cmd Below is the log when i run the above code ********************************** Connected to 10.29.45.11. 220 (vsFTPd 2.0.1) 530 Please login with USER... (20 Replies)
Discussion started by: dll_fpga
20 Replies

10. Shell Programming and Scripting

FTP script not working

Hi , Hi , seems in my code '\' is ignoring in user id and considering DB_SVCGPRUAT as a ID and failing to connect to the FTP server. my complete ID 'BD\SVCGPRUAT', how to rectify this error. #!/bin/bash myuser='"BD\_SVCGPRUAT" { BD is domain } mypass='Welcome$123'... (4 Replies)
Discussion started by: Riverstone
4 Replies
FTP-PROXY(8)						    BSD System Manager's Manual 					      FTP-PROXY(8)

NAME
ftp-proxy -- Internet File Transfer Protocol proxy daemon SYNOPSIS
ftp-proxy [-6Adrv] [-a address] [-b address] [-D level] [-i netif] [-m maxsessions] [-P port] [-p port] [-q queue] [-R address] [-T tag] [-t timeout] DESCRIPTION
ftp-proxy is a proxy for the Internet File Transfer Protocol. FTP control connections should be redirected into the proxy using the ipnat(4) or pf(4) rdr command, after which the proxy connects to the server on behalf of the client. The proxy allows data connections to pass, rewriting and redirecting them so that the right addresses are used. All connections from the client to the server have their source address rewritten so they appear to come from the proxy. Consequently, all connections from the server to the proxy have their destination address rewritten, so they are redirected to the client. The proxy uses the pf(4) anchor facility for this, unless the option -i is specified, it will then use the ipnat(4) interface. Assuming the FTP control connection is from $client to $server, the proxy connected to the server using the $proxy source address, and $port is negotiated, then ftp-proxy adds the following rules to the various anchors. (These example rules use inet, but the proxy also supports inet6.) In case of active mode (PORT or EPRT): rdr from $server to $proxy port $port -> $client pass quick inet proto tcp from $server to $client port $port In case of passive mode (PASV or EPSV): nat from $client to $server port $port -> $proxy pass in quick inet proto tcp from $client to $server port $port pass out quick inet proto tcp from $proxy to $server port $port The options are as follows: -6 IPv6 mode. The proxy will expect and use IPv6 addresses for all communication. Only the extended FTP modes EPSV and EPRT are allowed with IPv6. The proxy is in IPv4 mode by default. -A Only permit anonymous FTP connections. Either user "ftp" or user "anonymous" is allowed. -a address The proxy will use this as the source address for the control connection to a server. -b address Address where the proxy will listen for redirected control connections. The default is 127.0.0.1, or ::1 in IPv6 mode. -D level Debug level, ranging from 0 to 7. Higher is more verbose. The default is 5. (These levels correspond to the syslog(3) levels.) -d Do not daemonize. The process will stay in the foreground, logging to standard error. -i netif Set ftp-proxy for use with IP-Filter. The argument netif should be set to the name of the network interface where rdr is applied on. -m maxsessions Maximum number of concurrent FTP sessions. When the proxy reaches this limit, new connections are denied. The default is 100 ses- sions. The limit can be lowered to a minimum of 1, or raised to a maximum of 500. -P port Fixed server port. Only used in combination with -R. The default is port 21. -p port Port where the proxy will listen for redirected connections. The default is port 8021. -q queue Create rules with queue queue appended, so that data connections can be queued. -R address Fixed server address, also known as reverse mode. The proxy will always connect to the same server, regardless of where the client wanted to connect to (before it was redirected). Use this option to proxy for a server behind NAT, or to forward all connections to another proxy. -r Rewrite sourceport to 20 in active mode to suit ancient clients that insist on this RFC property. -T tag Automatically tag packets passing through the pf(4) rule with the name supplied. -t timeout Number of seconds that the control connection can be idle, before the proxy will disconnect. The maximum is 86400 seconds, which is also the default. Do not set this too low, because the control connection is usually idle when large data transfers are taking place. -v Set the 'log' flag on pf rules committed by ftp-proxy. Use twice to set the 'log-all' flag. The pf rules do not log by default. CONFIGURATION
To make use of the proxy using pf(4), pf.conf(5) needs the following rules. All anchors are mandatory. Adjust the rules as needed. In the NAT section: nat-anchor "ftp-proxy/*" rdr-anchor "ftp-proxy/*" rdr pass on $int_if proto tcp from $lan to any port 21 -> 127.0.0.1 port 8021 In the rule section: anchor "ftp-proxy/*" pass out proto tcp from $proxy to any port 21 To make use of the proxy using ipnat(4), ipnat.conf(5) need the following rule: rdr $int_if any port 21 -> 127.0.0.1 port 8021 tcp SEE ALSO
ftp(1), ipnat(4), pf(4), ipnat.conf(5), pf.conf(5) CAVEATS
ipnat(4) and pf(4) does not allow the ruleset to be modified if the system is running at a securelevel higher than 1. At that level ftp-proxy cannot add rules to the anchors and FTP data connections may get blocked. Negotiated data connection ports below 1024 are not allowed. The negotiated IP address for active modes is ignored for security reasons. This makes third party file transfers impossible. ftp-proxy chroots to "/var/chroot/ftp-proxy" and changes to user "_proxy" to drop privileges. BSD
August 1, 2007 BSD
All times are GMT -4. The time now is 02:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy