pyftpdlib
pyftpdlib copied to clipboard
Adding masquerade_address_map client ip support
Signed-off-by: weizi [email protected]
Adding masquerade_address_map client ip masquerade_address_map = {"2.2.2.1":"2.2.2.1","4.4.4.1":"4.4.4.1"}
client-A -> nat device -> ftp server. <- nat device. <- client-B
| client-A | nat device | ftp server | nat device | client-B |
|---|---|---|---|---|
| 1.1.1.1 | 2.2.2.1 | 3.3.3.1 | 4.4.4.1 | 5.5.5.1 |
What's the story behind this? Why is this needed?
What's the story behind this? Why is this needed?
| client-A | nat device A | ftp server | nat device B | client-B |
|---|---|---|---|---|
| 1.1.1.1 | 2.2.2.1 | 3.3.3.1 | 4.4.4.1 | 5.5.5.1 |
- The nat device only allows pasv mode for clients accessing the ftp server, and does not support alg.
- ftp server connects two networks through nat.
- The ftp server has a single network card, so the ftp server can only send masquerade_address based on client ip information.