Running a Google Compute Instance with an internal interface mapped to a temporary public IP... it seems impossible to establish an active ftp connection with an external ftp server. I saw another post without any solutions about active mode connection from google cloud. In my opinion there are some problem in the NAT / port forwarding rules between local and public IP.
ftp xxx.xxx.xxx.xxx
Connected to xxx.xxx.xxx.xxx.
220 Microsoft FTP Service
Name (xxx.xxx.xxx.xxx:user): username
331 Password required for username.
Password:
230-Welcome
230 User user logged in.
Remote system type is Windows_NT.
ftp> dir
500 Invalid PORT Command.
ftp: bind: Address already in use
ftp>
In the "google firewall" I opened all ports from xxx.xxx.xxx.xxx (ftp server address). The server accept only active mode connections (no passive).
There are no firewall rules in the local machine.
ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1460
inet 10.132.0.3 netmask 255.255.255.255 broadcast 10.132.0.3
ether 42:01:0a:84:00:03 txqueuelen 1000 (Ethernet)
RX packets 19215527 bytes 28123647876 (26.1 GiB)
RX errors 0 dropped 0 overruns 0 frame 1
TX packets 10673733 bytes 814976332 (777.2 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1 (Local Loopback)
RX packets 162643 bytes 54080619 (51.5 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 162643 bytes 54080619 (51.5 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Thanks in advance!