M
M
Max2018-05-31 02:04:47
linux
Max, 2018-05-31 02:04:47

How to access FTP behind NAT VirtualBox?

Good afternoon!
Configuration:
Server on Hetzner (maybe this is also important), running Ubuntu 16 with GUI, VNC connection. It costs VirtualBox, it has a Windows 7 guest system (communication via RDP with port forwarding via VB directly to the guest OS, see the screen below).
The guest OS has Ospanel with configured FTP on port 21 with authorization prntscr.com/jos1x3 (the currports utility shows that it hangs on 21, 990 and 14147 (?) ports prntscr.com/jorxt1 ), communication with FTP inside the guest system is via ftp ://localhost:21 | ftp://127.0.01:21
Configured port forwarding the same as I did for RDP from host system to guest system 2222>21 port prntscr.com/jorzen
2222 port is listening in the system,

netstat -an | grep 2222
tcp        0      0 DEDIC_IP:2222       0.0.0.0:*               LISTEN

When I try to connect from outside (browser, winscp), or in the host system itself, the situation is the same.
I see that there is a connection with the host (ubuntu) on port 2222, the connection is ESTABLISHED, but then it turns out that it doesn’t reach the guest OS or it does (although forwarding works the same as with RDP is configured), but I don’t see connections there. When trying to connect after 30 seconds, it gives an error (Wait interval exceeded). If you try another port, it immediately turns off.
In the Windows guest OS, the firewall is disabled wherever possible.
Please tell me where is the error and where to dig?
UPDATE:
Link is up! It turned out that in Ospanel it was necessary to put the static IP of the guest OS instead of localhost. Now a new error is FTP passive prntscr.com/jos85h .

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Z
Zzzz9, 2018-05-31
@wtfowned

ports are both open 20.21?

S
Sergey Sakhno, 2018-05-31
@Punk_Joker

In the virtual machine network settings, select the connection type Virtual host adapter. Next, look in the guest IP address, and connect to it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question