From 5bc36a67c7360b8c18072f762f35362e227581fc Mon Sep 17 00:00:00 2001 From: Daniel Jakots Date: Wed, 24 Jan 2018 15:14:08 -0500 Subject: [PATCH] cas du nat --- HowtoOpenBSD/ProxyFTP.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/HowtoOpenBSD/ProxyFTP.md b/HowtoOpenBSD/ProxyFTP.md index ec0f0bc5..6cec65e8 100644 --- a/HowtoOpenBSD/ProxyFTP.md +++ b/HowtoOpenBSD/ProxyFTP.md @@ -30,6 +30,20 @@ pf.conf # pfctl -f /etc/pf.conf ~~~ +Dans le cas où le firewall fait du NAT, il faut lancer ftpproxy avec des flags un peu différents : + +~~~ +# rcctl set ftpproxy flags -R 192.0.2.42 -p 21 -b 198.51.100.42 +~~~ + +Avec 192.0.2.42 l'ip privée du nat et 198.51.100.42 l'ip publique du firewall. On mettra alors les règles pf suivantes : + +~~~ +anchor "ftp-proxy/*" +pass in on egress inet proto tcp to 198.51.100.42 port 21 +~~~ + + Si besoin, on peut se référer à la man page [ftp-proxy(8)](https://man.openbsd.org/ftp-proxy). @@ -38,3 +52,4 @@ Si besoin de voir les règles présentes dans l'*anchor* ~~~ # pfctl -a 'ftp-proxy/*' -sr ~~~ +