Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
proFTPd access from outside network
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 797
Location: hawaii

PostPosted: Sun May 23, 2004 7:48 am    Post subject: proFTPd access from outside network Reply with quote

i got my proFTPd access to work, i'm in the same network and i'm able to FTP to my web directories perfectly fine, people can view my web directories fine also. but i can't access my ftp account from outside the network. i have my router forwarding ports 80, 21, and 22 to the server on my network. all using TCP ( does it have to be UDP ? ) i get errors like unable to access file listing, and unable to login from my ftp client outside the network. the ownership for the directory is ftp:ftp-users (like in hayl's howto) my proftpd.conf has the directory listed like this\
Code:

<Directory /server/ftpusername>
        Umask 022 022
        AllowOverwrite on
        <Limit MKD XMKD RNRF RNTO DELE RMD XRMD STOR RETR>
                AllowUser ftpusername
        </Limit>
</Directory>


what am i doing wrong?
Back to top
View user's profile Send private message
Maup
n00b
n00b


Joined: 20 May 2004
Posts: 36
Location: Den Dungen

PostPosted: Sun May 23, 2004 9:13 am    Post subject: Reply with quote

How do you start your ProFTPD server ?

If you are doing that via xinetd, please include your /etc/xinetd.d/proftpd file.

If you are running it on its own, please include your config file...

greetz

Maurits
_________________
It must be logic: Before you can shutdown, you have to use Start....
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 797
Location: hawaii

PostPosted: Sun May 23, 2004 1:13 pm    Post subject: Reply with quote

Code:

ServerIdent on "Please enter your username and password. Anonymous logins are disabled.
        ServerName RemixServer1
        ServerType standalone
        ServerAdmin remix@remixdesignstudio.com
        DeferWelcome on

        ShowSymlinks off
        MultilineRFC2228 on
        DefaultServer on
        AllowOverwrite on
        MaxClients 10
        MaxClientsPerHost 1 "You are already logged on once."
        RequireValidShell off

        TimeoutNoTransfer 600
        TimeoutStalled 10
        TimeoutLogin 20
        TimeoutIdle 1200

        RootLogin off
        UseFtpUsers off

        Port 21
        MaxInstances 30

        # Lock users into the ftproot directory
        DefaultRoot ~

        # Logging formats
        LogFormat default "%h %l %u %t \"%r\" %s %b"
        LogFormat auth "%v [%P] %h %t \"%r\" %s"
        LogFormat write "%h %l %u %t \"%r\" %s %b"

        # activate logging

        # every login
        ExtendedLog /var/log/ftp_auth.log AUTH auth

        # file/dir access
        ExtendedLog /var/log/ftp_access.log WRITE,READ write

        ListOptions "-l"

        DenyFilter \*.*/

# Set the user and group that the server normally runs at.
        User ftp
        Group ftp-users


        DisplayLogin            welcome.msg
        DisplayFirstChdir       .message

#<Directory />
#        Umask 022 022
#        AllowOverwrite off
#        <Limit MKD STOR DELE XMKD RNRF RNTO RMD XRMD>
#                AllowAll
#        </Limit>
#</Directory>

<Directory /server/user1>
   Umask 022 022
    AllowOverwrite on
   <Limit MKD XMKD RNRF RNTO DELE RMD XRMD STOR RETR>
      AllowUser user1
   </Limit>
</Directory>

<Directory /server/user2>
   Umask 022 022
   AllowOverwrite on
   <Limit MKD XMKD RNRF RNTO DELE RMD XRMD STOR RETR>
      AllowUser user2
   </Limit>
</Directory>


does FTP or SSH use UDP instead of TCP?
Back to top
View user's profile Send private message
Maup
n00b
n00b


Joined: 20 May 2004
Posts: 36
Location: Den Dungen

PostPosted: Sun May 23, 2004 2:39 pm    Post subject: Reply with quote

Mmm,

config seems ok to me...

You weren't very clear about if you run ProFTPD from xinetd or standalone.

BTW: Only TCP settings are necessary in the firewall. Thats because the main difference between TCP and UDP packets is that UDP is broadcast (for example used for DHCP) and TCP needs a verified connection (a channel).
So it seems quite strange wanting to run a UDP FTP server, let alone an broadcast SSH server ... :wink:

In your first post you mentioned ownership for directories, but what directories do you mean ?
Please consider that when a user logs in to your server and accesses files or directories, it is done as the user himself. For proper access the owner of the directory you want to access has to be the username you use to log in.

Does this ring any bells ?

greetz

Maup
_________________
It must be logic: Before you can shutdown, you have to use Start....
Back to top
View user's profile Send private message
nobspangle
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1318
Location: Manchester, UK

PostPosted: Sun May 23, 2004 3:11 pm    Post subject: Reply with quote

are you using passive or non-passive mode to connect?

Is the client behind a firewall?
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 797
Location: hawaii

PostPosted: Sun May 23, 2004 8:42 pm    Post subject: Reply with quote

Servertype Standalone

passive mode

no firewall

what is with the ftp:ftp-users ?
how do i configure it so that a client can access anything in the <Directory> should it be user1:ftp-users ?

thanks btw.
Back to top
View user's profile Send private message
remix
l33t
l33t


Joined: 28 Apr 2004
Posts: 797
Location: hawaii

PostPosted: Mon May 24, 2004 7:13 am    Post subject: Reply with quote

ok i double checked everything and still an outside client is unable to access his own directory. its error 200 everytime, unable to retrieve file listing, connection aborted.

my router is forwarded to that server using port 21, the server is listening on port 21, proftpd is started, the configuration is correct because i can login to any of the accounts using my computer within the network, i have full access to uploading, downloading, anything.

would anyone happen to know of any solutions they have experienced when trying to connect to a server from outside of the lan?
Back to top
View user's profile Send private message
Maup
n00b
n00b


Joined: 20 May 2004
Posts: 36
Location: Den Dungen

PostPosted: Mon May 24, 2004 9:42 am    Post subject: Reply with quote

Mmm, strange...

You can change the owner:group with chown <owner>:<group> so in your case chown <username>:ftpusers.

One question though: are you able to login under every username successfully when accessing the server locally ?

BTW (maybe completely unnessecary remark) What I meant with or without xinetd is if you have started the server via /etc/init.d/proftpd start (or via the rc-update add proftpd default) or via /etc/init.d/xinetd start (with the configuration of the access to the ftp server in /etc/xinetd.d/proftpd).
This is because it seems to me that there is something on the server or in the gateway that is filtering outside traffic...

greetz

Maurits
_________________
It must be logic: Before you can shutdown, you have to use Start....
Back to top
View user's profile Send private message
leszcz
n00b
n00b


Joined: 03 Feb 2004
Posts: 20

PostPosted: Mon May 24, 2004 10:11 am    Post subject: Reply with quote

Hi,

remix, you need two addition options in proftpd.conf

MasqueradeAddress a.b.c.d (a.b.c.d - your public ip)
PassivePorts xxxxx yyyyy

You have to forward passive ports range to proftpd machine on your firewall.

Regards
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum