Help - Search - Members - Calendar
Full Version: 20 Questions
Linuxhelp > Support > Technical Support
Jamo
Hi, Ive just set up redhat 9 LAMP box to host my forums and ftp on and have a few questions, most are probably pretty simple but I am very new to linux. Here goes...

vsftpd
1. I am using vsftpd for my ftp server, I have it up and running and can access the ftp through ftp://localhost. It takes me to the default directory where I can see the "pub" folder. How can I set the ftp directory to somewhere else, say on another hd? I have looked in the vsftpd.conf file but could not find anything about home directories.

2. To change permissions for a folder, Uploads for example, do I just chmod the folder to allow write/read?
Hemant
Well i will provide anwers of few questions for which i am sure about:
1.Switch to text mode and enter command setup as root..
this will allow you to add services during starttp.Apart from that there are several graphical utilities with help of which you can do that.
2.Probably you will want apache is able to write this file..
chmod or chown both of them can do the job
3.for cronjob you can either use crontab or at command..
for description about them checkout ..
man 5 crontab
man at
4.You can edit the file..../etc/inittab and set the default boot level to runlevel 3
5.To start gnome from there you can use command
startx &
if you want a particular window manager then you have to edit file ~/.Xclients or ~/.xinitrc
6.telnet or rather ssh
7.
hughesjr
I'll answer one at a time ...
QUOTE
2. How can I assign a range of IPs to allow into my server, the range is 150.203.0.0-150.203.255.255. All other IPs are not to be allowed to connect.

There are 2 ways ...

1. You can use iptables as a firewall ... open tcp ports 20 and 21 only from the IP's that you want to allow. If you are already using iptables, this rule should allow FTP for the network that you want:

in the accept section:

-A INPUT -s 150.203.0.0/255.255.0.0 -p tcp --dport 20:21 -j ACCEPT

and then in the reject section:
-A INPUT -p tcp --dport 20:21 -j REJECT

2. You can install the package tcp_wrappers from the redhat cd's .. to see if you already have it installed do this command:

rpm -qa | grep wrapper

Once you have tcp_wrappers installed, inside the vsftpd.conf file, use this line:

tcp_wrappers=YES

Then in your /etc/hosts.allow file add this line:

vsftpd: 150.203.

And in /etc/hosts.deny add this line:

vsftpd: ALL
--------------------------------------------------------------------
Jamo
Thanks guys, I have edited my first post to get rid of the questions I now know the answer to, Im still not sure on a couple though.
Jamo
QUOTE (hughesjr @ Jan 24 2004, 05:30 PM)
If you are already using iptables, this rule should allow FTP for the network that you want:

in the accept section:

-A INPUT -s 150.203.0.0/255.255.0.0 -p tcp --dport 20:21 -j ACCEPT

and then in the reject section:
-A INPUT -p tcp --dport 20:21 -j REJECT

do you mean 150.203.0.0/150.203.255.255 or what you wrote? Also, where to I add those rules?
hughesjr
What I wrote is right... it defines the class B network that includes only the IP's 150.203.0.0 - 150.203.255.255 {it includes the network number (150.203.0.0) and the class B subnet mask (255.255.0.0)}.

Where you would put it is either in your iptables firewall script (if you have one) ... or in /etc/sysconfig/iptables if you are using the default RH9 firewall implementation.

The name INPUT might need to be changed to something else ... like, for example RH-Lokkit-0-50-INPUT would be substituted for INPUT if you used the standard RH9 firewall setup tool ... for RHEL 3 (or WhiteBox Enterprise Linux) and Fedora Core 1, you would substitute RH-Firewall-1-INPUT for INPUT if you used the default setup tool.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.