Re: [Proftpd-user] NAT issue with virtualHost
Philippe Mackowiak via Proftp-user <[email protected]> Thu, 7 Nov 2024 09:58:50 +0000
| Newsgroups | gmane.network.proftpd.user |
|---|---|
| Message-ID | <MR1P264MB1731824574BC2BDDC9024A0CB45C2@MR1P264MB1731.FRAP264.PROD.OUTLOOK.COM> |
--===============4306799549817036938==
Content-Language: fr-FR
Content-Type: multipart/alternative;
boundary="_000_MR1P264MB1731824574BC2BDDC9024A0CB45C2MR1P264MB1731FRAP_"
--_000_MR1P264MB1731824574BC2BDDC9024A0CB45C2MR1P264MB1731FRAP_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Thank you for your answer.
Following your remarks, I ended up have the following config working for a =
VirtualHost over inbound NAT device.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Port 0
DefaultServer off
<VirtualHost <private_ip>>
Port 21
PassivePorts 60000 65535
MasqueradeAddress <public_ip>
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Well, in the end, that was an easy one, thanks for the tip.
Regards.
PM.
-----Message d'origine-----
De : TJ Saunders <[email protected]>
Envoy=E9 : mercredi 6 novembre 2024 22:23
=C0 : ProFTPD Users <[email protected]>
Cc : Philippe Mackowiak <[email protected]>
Objet : Re: [Proftpd-user] NAT issue with virtualHost
> This config works (without VirtualHost): No issue.
Can you clarify what "works" means, specifically? That is, are TCP connect=
ions not accepted? Is authentication failing? Does authentication succeed=
, but data transfers (including directory listings) stall/fail?
The ways in which things fail, or don't work as expected, can help indicate=
the causes/factors involved.
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> DefaultAddress <private_ip>
> Port 21
> DefaultServer off
> MasqueradeAddress <public_ip>
> PassivePorts 60000 65535
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
>
> This one does not work (commands hanging over passive ftp connection):
>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> Port 0
> DefaultServer off
> PassivePorts 60000 65535
>
> <VirtualHost <private_ip>>
> Port 21
> MasqueradeAddress <public_ip>
My initial guess is that, in this second case, the PassivePorts directive i=
s not in effect for the <VirtualHost>.
Directives outside of any <Global> (or <VirtualHost>) section are not autom=
atically globally applied; see:
http://www.proftpd.org/docs/howto/Vhost.html
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> This one does not work either: warning: "Virtual Server" address/port
> (xxxxx) already in use by "ProFTP server"
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
> Port 21
> DefaultServer off
> PassivePorts 60000 65535
>
> <VirtualHost <private_ip>>
> MasqueradeAddress <public_ip>
In this particular case, the warning is saying that your <VirtualHost> sect=
ion is using Port 21 (the default value) by default -- and that it is colli=
ding with the "server config" (default vhost), which is also using Port 21.
Hope this helps,
TJ
--_000_MR1P264MB1731824574BC2BDDC9024A0CB45C2MR1P264MB1731FRAP_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-compose;
font-family:"Times New Roman",serif;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"FR" link=3D"blue" vlink=3D"purple" style=3D"word-wrap:break-w=
ord">
<div class=3D"WordSection1">
<div>
<p class=3D"MsoNormal"><span lang=3D"EN-GB"><br>
Thank you for your answer.<br>
<br>
Following your remarks, I ended up have the following config working for a =
VirtualHost over inbound NAT device.<br>
<br>
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:10.0pt;font-=
family:"Arial",sans-serif">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:10.0pt;font-=
family:"Arial",sans-serif">Port 0<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:10.0pt;font-=
family:"Arial",sans-serif">DefaultServer &=
nbsp; &nbs=
p; off<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:10.0pt;font-=
family:"Arial",sans-serif"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:10.0pt;font-=
family:"Arial",sans-serif"><VirtualHost <private_ip>>=
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:10.0pt;font-=
family:"Arial",sans-serif"> &n=
bsp;
</span><span style=3D"font-size:10.0pt;font-family:"Arial",sans-s=
erif">Port  =
; 21<o:p></o:p></span></p>
<p class=3D"MsoNormal" style=3D"text-indent:35.4pt"><span lang=3D"EN-GB" st=
yle=3D"font-size:10.0pt;font-family:"Arial",sans-serif">PassivePo=
rts =
60000 65535<o:p></o:p></span></p=
>
<p class=3D"MsoNormal" style=3D"text-indent:35.4pt"><span lang=3D"EN-GB" st=
yle=3D"font-size:10.0pt;font-family:"Arial",sans-serif">Masquerad=
eAddress <public_ip><o:p></o:p></=
span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB" style=3D"font-size:10.0pt;font-=
family:"Arial",sans-serif">=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB">Well, in the end, that was an e=
asy one, thanks for the tip.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB"><o:p> </o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB">Regards.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB">PM.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-GB"><br>
<br>
-----Message d'origine-----<br>
De : TJ Saunders <[email protected]> <br>
Envoy=E9 : mercredi 6 novembre 2024 22:23<br>
=C0 : ProFTPD Users <[email protected]><br>
Cc : Philippe Mackowiak <[email protected]><br>
Objet : Re: [Proftpd-user] NAT issue with virtualHost<br>
<br>
<br>
> This config works (without VirtualHost): No issue.<br>
<br>
Can you clarify what "works" means, specifically? That is, =
are TCP connections not accepted? Is authentication failing? Do=
es authentication succeed, but data transfers (including directory listings=
) stall/fail?<br>
<br>
The ways in which things fail, or don't work as expected, can help indicate=
the causes/factors involved.<br>
<br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>
> DefaultAddress &n=
bsp; <private_ip><br>
> Port =
&nb=
sp; 21<br>
> DefaultServer &nb=
sp; off<br>
> MasqueradeAddress <public_ip>=
;<br>
> PassivePorts &nbs=
p; 60000 65535<br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>
> <br>
> This one does not work (commands hanging over passive ftp connection):=
<br>
> <br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>
> Port 0<br>
> DefaultServer &nb=
sp; off<br>
> PassivePorts &nbs=
p; 60000 65535<br>
> <br>
> <VirtualHost <private_ip>><br>
> Port =
&nb=
sp; 21<br>
> MasqueradeAddress =
; <public_ip><br>
<br>
My initial guess is that, in this second case, the PassivePorts directive i=
s not in effect for the <VirtualHost>.<br>
<br>
Directives outside of any <Global> (or <VirtualHost>) section a=
re not automatically globally applied; see:<br>
<br>
</span><a href=3D"http://www.proftpd.org/docs/howto/Vhost.html" targ=
et=3D"_BLANK"><span lang=3D"EN-GB">http://www.proftpd.org/docs/howto/Vhost.=
html</span></a><span lang=3D"EN-GB"><br>
<br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>
> This one does not work either: warning: "Virtual Server" add=
ress/port <br>
> (xxxxx) already in use by "ProFTP server"<br>
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D<br>
> Port 21<br>
> DefaultServer &nb=
sp; off<br>
> PassivePorts &nbs=
p; 60000 65535<br>
> <br>
> <VirtualHost <private_ip>><br>
> MasqueradeAddress =
; <public_ip><br>
<br>
In this particular case, the warning is saying that your <VirtualHost>=
; section is using Port 21 (the default value) by default -- and that it is=
colliding with the "server config" (default vhost), which is als=
o using Port 21.<br>
<br>
</span>Hope this helps,<br>
TJ<o:p></o:p></p>
</div>
</div>
</body>
</html>
--_000_MR1P264MB1731824574BC2BDDC9024A0CB45C2MR1P264MB1731FRAP_--
--===============4306799549817036938==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4306799549817036938==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
ProFTPD Users List <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
--===============4306799549817036938==--