HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Need small help on FTP access
Operating System - Linux
1828667
Members
1663
Online
109984
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 04:04 AM
08-15-2006 04:04 AM
Need small help on FTP access
Hi,
I have vsftp server installed on SUSE Linux 9.0 OS.
I need to deny ftpuser (its a user account) all the access services except performing ftp to the server.
Please scrap in with the solutions.
Thanks in advance.
Girish
I have vsftp server installed on SUSE Linux 9.0 OS.
I need to deny ftpuser (its a user account) all the access services except performing ftp to the server.
Please scrap in with the solutions.
Thanks in advance.
Girish
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 05:23 AM
08-15-2006 05:23 AM
Re: Need small help on FTP access
Shalom Girish,
If the user always has the same host name you can deny access based on ip address with iptables, only on ports 20 and 21.
You control this with vsftpd.conf
http://vsftpd.beasts.org/vsftpd_conf.html
http://elibrary.fultus.com/technical/topic/com.fultus.redhat.elinux4/manuals/rhel-rg-en-4/s2-ftp-vsftpd-conf.html
SEP
If the user always has the same host name you can deny access based on ip address with iptables, only on ports 20 and 21.
You control this with vsftpd.conf
http://vsftpd.beasts.org/vsftpd_conf.html
http://elibrary.fultus.com/technical/topic/com.fultus.redhat.elinux4/manuals/rhel-rg-en-4/s2-ftp-vsftpd-conf.html
SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2006 12:15 PM
08-15-2006 12:15 PM
Re: Need small help on FTP access
Just use for that user a shell which only allows ftp. For instance, you could have in /etc/passwd:
ftp:x:14:50:FTP User:/archives/arhive:/sbin/nologin
Depending on your needs, you could also chroot the user in its home dir (see the man page). Please also verify if you need (or not) to add the shell you setup for that user to the file /etc/shells.
A secondary line of securing is tcp_wrappers (controlling access to daemons via /etc/hosts.{allow,deny}.
And last but not least, iptables, as has already been suggested. However, please DO NOT use the old and incorrect way of allowing ports 20 and 21; the correct way is to allow port 21 and use the connection tracking facilities of iptables (-m state --state RELATED,ESTABLISHED) which will allow both active and passive ftp to function (unlike the port 20/21 variant). Just make sure the relevant conntrack modules are loaded.
ftp:x:14:50:FTP User:/archives/arhive:/sbin/nologin
Depending on your needs, you could also chroot the user in its home dir (see the man page). Please also verify if you need (or not) to add the shell you setup for that user to the file /etc/shells.
A secondary line of securing is tcp_wrappers (controlling access to daemons via /etc/hosts.{allow,deny}.
And last but not least, iptables, as has already been suggested. However, please DO NOT use the old and incorrect way of allowing ports 20 and 21; the correct way is to allow port 21 and use the connection tracking facilities of iptables (-m state --state RELATED,ESTABLISHED) which will allow both active and passive ftp to function (unlike the port 20/21 variant). Just make sure the relevant conntrack modules are loaded.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP