rpm -ivh http://dag.wieers.com/rpm/packages/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
cd /etc/yum.repos.d/
wget http://rpms.famillecollet.com/enterprise/remi.repo
yum install freetds
yum install freetds-devel
yum install --enablerepo=remi php-mssql
Followers
Monday, 12 November 2012
Connect PHP to MSSQL Server Setting
Thursday, 8 November 2012
How to install wireshark in CentOs 6.2
firstly type
# yum install wireshark -y
install for GUI version
# yum install wireshark-gnome
# yum install wireshark -y
install for GUI version
# yum install wireshark-gnome
Tuesday, 6 November 2012
Sunday, 4 November 2012
ProFTPD and AuthUserFile for password file
ProFTPD and AuthUserFile for password file
By dooblem on Monday 11 October 2010, 00h45 - Permalink
Default in Debian: ProFTPD only uses the
/etc/passwd
system user base.
To add "virtual" users :
In
/etc/proftpd/proftpd.conf
:DefaultRoot ~ AuthUserFile /etc/proftpd/ftpd.passwd RequireValidShell off
Then restart proftpd:
/etc/init.d/proftpd restart
Create users file:
vi /etc/proftpd/ftpd.passwd username:HASH:1011:1011:MyUserName:/home/ftp/directory:/bin/true
You can also generate the user lines with the
ftpasswd
command, but I think it's simpler to generate passwords with the command:mkpasswd --hash=md5
Then paste the HASH in the passwd file.
Correct passwd file permissions:
chown proftpd /etc/proftpd/ftpd.passwd chmod go-r /etc/proftpd/ftpd.passwd
And just test it to finish.
Thursday, 1 November 2012
mod_python installation guide
To install mod_python, we need the EPEL repositories:
Now edit the /etc/yum.repos.d/eped.repo file and add priority=10 to the [epel] section.
After that follow the steps below and you’ll have mod_python installed and active.
Now you should configure your httpd.conf files so that apache nows
where and when to interpret your Python scripts. If you have installed
you system with our LAMP installer, then go to /etc/httpd/conf.d and edit you websites .conf file (starting with a z_)
Make sure you add the following lines in the <Directory …> </Directory> statements.
Don’t forget that PythonDebug is for debug mode. When you’re done developing it may be a good idea to turn it off.
Also don’t forget to add your DirectoryIndex handlers so that Apache knows you can also have Python Index files. You can add this right after the </Directory> statement.
Since we’ve altered with the configuration files of Apache, we should restart it again, then you are ready to go.
1 | rpm -- import https://fedoraproject.org/static/0608B895.txt |
2 | wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-7.noarch.rpm |
3 | rpm -ivh epel-release-6-7.noarch.rpm |
4 | yum install yum-priorities |
After that follow the steps below and you’ll have mod_python installed and active.
1 | yum install mod_python |
2 | service httpd restart |
1 | vi /etc/httpd/conf.d/z_castmator.com |
1 | AddHandler mod_python .py |
2 | PythonHandler mod_python.publisher |
3 | PythonDebug On |
Also don’t forget to add your DirectoryIndex handlers so that Apache knows you can also have Python Index files. You can add this right after the </Directory> statement.
1 | DirectoryIndex index.html index.php index.py |
1 | service httpd restart |
Wednesday, 31 October 2012
Enable tls/ssl in proftpd
Question: How to Enable tls/ssl in proftpd
Benefits of TLS/SSLTLS/SSL provides numerous benefits to clients and servers over other methods of authentication, including:
- Strong authentication, message privacy, and integrity
- Interoperability
- Algorithm flexibility
- Ease of deployment
- Ease of use
1- Install Proftpd and openssl
apt-get install proftpd openssl yum install proftpd openssl
2- Create SSL Certificates
mkdir /opt/ssl/ cd /opt/ssl
3- Generate ssl certificate with
openssl req -new -x509 -days 365 -nodes -out proftpd.cert.pem -keyout proftpd.key.pem
Generating a 2048 bit RSA private key .....................+++ ..........+++ writing new private key to 'proftpd.key.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:NL State or Province Name (full name) []:Adam Locality Name (eg, city) [Default City]:Adam Organization Name (eg, company) [Default Company Ltd]:Unixmen Organizational Unit Name (eg, section) []:Unixmen Common Name (eg, your name or your server's hostname) []:Unixmen-test Email Address []:@unixmen.com
4- Enable TLS In ProFTPd
Edit /etc/proftpf/proftpd.conf or /etc/proftpd.conf (Ubuntu/Centos)<IfModule mod_tls.c> TLSEngine on TLSLog /var/log/proftpd/tls.log TLSProtocol SSLv23 TLSOptions NoCertRequest TLSRSACertificateFile /opt/ssl/proftpd.cert.pem TLSRSACertificateKeyFile /opt/ssl/proftpd.key.pem TLSVerifyClient off TLSRequired on </IfModule>
5- Check if proftpd ready with:
# proftpd -vv ProFTPD Version: 1.3.3g (maint) Scoreboard Version: 01040003 Built: Thu Nov 10 2011 16:20:47 UTC
Loaded modules: mod_lang/0.9 mod_ctrls/0.9.4 mod_cap/1.0 mod_vroot/0.9.2 mod_tls/2.4.2 mod_auth_pam/1.1 mod_readme.c mod_ident/1.0 mod_dso/0.5 mod_facts/0.1 mod_delay/0.6 mod_site.c mod_log.c mod_ls.c mod_auth.c mod_auth_file/0.8.3 mod_auth_unix.c mod_xfer.c mod_core.c6- Now start proftpd
/etc/init.d/proftpd start Starting proftpd: [ OK ]and is done!
Tuesday, 30 October 2012
ProFTPD module mod_vroot
ProFTPD module mod_vroot
This module is contained in the
mod_vroot.c
file for
ProFTPD 1.3.x, and is not compiled by default. Installation
instructions are discussed here.
The purpose of this module to is to implement a virtual chroot capability
that does not require root privileges. The mod_vroot
module
provides this capability by using ProFTPD's FS API, available as of 1.2.8rc1.
The most current version of
mod_vroot
can be found at:
http://www.castaglia.org/proftpd/
Author
Please contact TJ Saunders <tj at castaglia.org> with any questions, concerns, or suggestions regarding this module.Thanks
2003-08-26: Thanks to Oskar Liljeblad for the elegant patch that added symlink support.Directives
VRootAlias
Syntax: VRootAlias src-path dst-pathDefault: None
Context: server config,
<VirtualHost>
, <Global>
Module: mod_vroot
Compatibility: 1.3.2 and later The
VRootAlias
directive is used to create an "alias" of a
directory outside of the chroot area into the chroot. The dst-path
parameter is a relative path, relative to the chroot area (i.e.
the directory in which the session starts). The src-path parameter,
on the other hand, is an absolute path, and may be to a file or
directory.
For example, you might map a shared upload directory into a user's home directory using:
<IfModule mod_vroot.c> VRootEngine on DefaultRoot ~ VRootAlias /var/ftp/upload ~/upload </IfModule>This will automatically create an "upload" directory to appear in the chroot area (in this case, the user's home directory). Note that this directive will not work if the
VRootServerRoot
is used.
VRootEngine
Syntax: VRootEngine on|offDefault: None
Context: server config,
<VirtualHost>
, <Global>
Module: mod_vroot
Compatibility: 1.2.8rc1 and later The
VRootEngine
directive enables the virtual chroot engine
implemented by mod_vroot
. If enabled, the virtual chroot will
be used in place of the operating system's chroot(2)
. This
directive affects any DefaultRoot
directives and any
<Anonymous>
contexts within the server context in which
the VRootEngine
directive appears.
VRootLog
Syntax: VRootLog fileDefault: None
Context: server config,
<VirtualHost>
, <Global>
Module: mod_vroot
Compatibility: 1.3.0rc1 and later The
VRootLog
directive is used to specify a log file for
mod_vroot
's reporting on a per-server basis. The file
parameter given must be the full path to the file to use for logging.
VRootOptions
Syntax: VRootOptions opt1 ...Default: None
Context: "server config"
<VirtualHost>
, <Global>
Module: mod_vroot
Compatibility: 1.2.9rc2 and later The
VRootOptions
directive is used to configure various optional
behavior of mod_vroot
.
Example:
VRootOptions allowSymlinksThe currently implemented options are:
allowSymlinks
Normally, any symlinks that point outside of the vroot area simply do not work. When theallowSymlinks
option is enabled, these symlinks will be allowed. Note that by enabling symlinks, the efficacy of the vroot "jail" is reduced.
VRootServerRoot
Syntax: VRootServerRoot pathDefault: None
Context: "server config"
<VirtualHost>
, <Global>
Module: mod_vroot
Compatibility: 1.3.2rc1 and later The
VRootServerRoot
directive is used to configure a directory
to which the mod_vroot
module will perform a real chroot.
The idea is that each <VirtualHost>
can have its own
directory to which a real chroot(2)
system call is made;
the user-specific home directories will be virtual roots underneath this
directory. Thus some measure of security, via the chroot(2)
system call, is provided by the kernel, while still allowing symlinked shared
folders among users of this <VirtualHost>
.
For example:
<VirtualHost a.b.c.d> VRootEngine on VRootServerRoot /etc/ftpd/a.b.c.d/ VRootOptions allowSymlinks DefaultRoot ~ ... </VirtualHost>See also:
VRootOptions
Installation
After unpacking and patching the latest proftpd-1.3.x source code, copy themod_vroot.c
file into:
proftpd-dir/contrib/Then follow the normal steps for using third-party modules in proftpd:
./configure --with-modules=mod_vroot make make install
Author: $Author: tj $
Last Updated: $Date: 2009/10/19 16:30:18 $
© Copyright 2000-2009 TJ Saunders
All Rights Reserved
How to install and configure vsftpd
This tutorial focuses on how to setup vsftpd server on your linux
based VPS or a dedicated server. The vsftpd stands for “Very Secure FTP
Daemon”. It is not just secure as the name suggests but also delivers
excellent performance by consuming less memory. The tutorial also
teaches you how to configure by adding ftp users and locking the
directory to individual users.
You can install vsftpd on Ubuntu / Debian, CentOS /Fedora and RHEL linux.
Installing vsftpd on Ubuntu or Debian
Installing vsftpd on CentOS / Fedora
How to configure vsftpd:
Now that you’ve installed vsftpd, follow this procedure to configure it. These steps applies for both the linux variants.
Before you get started, stop the vsftpd by typing:
Edit the vsftp.conf
In Ubuntu / Debian:
In Red Hat / CentOS
Make the following changes:
We don’t want anonymous login:
Setup a password for the user:
In order to enable the ftpuser read and write the data in your home dir, change the permission and take ownership:
Create userlist file and add the user:
Ubuntu / Debian:
CentOS / Fedora
and add the user:
save the file and open the vsftp.conf file again:
Add the following lines at the end of the file and save it:
The file should look like this:
Now create a usergroup and add the ftpuser to it:
Now start the vsftpd:
That’s it. Now you have a secure installation of vsftpd on your server.
Article From:
NOOB2GEEK.com
You can install vsftpd on Ubuntu / Debian, CentOS /Fedora and RHEL linux.
Installing vsftpd on Ubuntu or Debian
sudo apt-get install vsftpd
Installing vsftpd on CentOS / Fedora
yum install vsftpd
How to configure vsftpd:
Now that you’ve installed vsftpd, follow this procedure to configure it. These steps applies for both the linux variants.
Before you get started, stop the vsftpd by typing:
service vsftpd stop
Edit the vsftp.conf
In Ubuntu / Debian:
vi /etc/vsftpd.conf
In Red Hat / CentOS
vi /etc/vsftpd/vsftpd.conf
Make the following changes:
We don’t want anonymous login:
anonymous_enable=NOEnable local users:
local_enable=YESThe ftpuser should be able to write data:
write_enable=YESPort 20 need to turned off, makes vsftpd run less privileged:
connect_from_port_20=NOChroot everyone:
chroot_local_user=YESset umask to 022 to make sure that all the files (644) and folders (755) you upload get the proper permissions.
local_umask=022Now that basic configuration is complete, now let us begin with locking / securing a directory to user.
sudo useradd -d /var/www/path/to/your/dir -s /usr/sbin/nologin ftpuser
Setup a password for the user:
sudo passwd ftpuser
In order to enable the ftpuser read and write the data in your home dir, change the permission and take ownership:
sudo chown -R ftpuser /var/www/path/to/your/dir
sudo chmod 775 /var/www/path/to/your/dir
Create userlist file and add the user:
Ubuntu / Debian:
vi /etc/vsftpd.userlist
CentOS / Fedora
vi /etc/vsftpd/vsftpd.userlist
and add the user:
ftpuser
save the file and open the vsftp.conf file again:
vi /etc/vsftpd.conf
Add the following lines at the end of the file and save it:
# the list of users to give accessAfter completing all these procedures it is almost ready to use it, give it a try but you will get a 500 OOPS permission denied error. To fix it you need to add a nologin to the shell set.
userlist_file=/etc/vsftpd.userlist
# this list is on
userlist_enable=YES
# It is not a list of users to deny ftp access
userlist_deny=NO
vi /etc/shells
The file should look like this:
/bin/kshAdd this line at the end:
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
/usr/sbin/nologin
Now create a usergroup and add the ftpuser to it:
sudo addgroup ftpusers
sudo usermod -Gftpusers ftpuser
Now start the vsftpd:
service vsftpd start
That’s it. Now you have a secure installation of vsftpd on your server.
Article From:
NOOB2GEEK.com
Tuesday, 28 February 2012
Modify host file in centos
I am trying to start the services of ProFTPd. There was an error found. The services cant start.
With my research from internet, I had been advices that to modify the host file. Over /etc/hosts
I add in two lines after the original hosts file.
ipaddress hosts name
This settle my services start problem.
With my research from internet, I had been advices that to modify the host file. Over /etc/hosts
I add in two lines after the original hosts file.
ipaddress hosts name
This settle my services start problem.
Monday, 20 February 2012
Shorewall Install in Centos Server
Shorewall Install in Centos Server
1. Download: wget http://www.shorewall.net/pub/shorewall/4.5/shorewall-4.5.0/shorewall-core-4.5.0-0base.noarch.rpm (May Be not working)
OR
wget http://llnw.hostoi.com/shorewall-core-4.5.0-0base.noarch.rpm
wget http://llnw.hostoi.com/shorewall-4.5.0-0base.noarch.rpm
or download here.
2. rpm -ivh shorewall-core-4.5.0-0base.noarch.rpm
3. yum install perl-Digest-SHA1
4. rpm -ivh shorewall-4.5.0-0base.noarch.rpm
5. DONE!!!
It is so simple and easy.
Thank you!!!
1. Download: wget http://www.shorewall.net/pub/shorewall/4.5/shorewall-4.5.0/shorewall-core-4.5.0-0base.noarch.rpm (May Be not working)
OR
wget http://llnw.hostoi.com/shorewall-core-4.5.0-0base.noarch.rpm
wget http://llnw.hostoi.com/shorewall-4.5.0-0base.noarch.rpm
or download here.
2. rpm -ivh shorewall-core-4.5.0-0base.noarch.rpm
3. yum install perl-Digest-SHA1
4. rpm -ivh shorewall-4.5.0-0base.noarch.rpm
5. DONE!!!
It is so simple and easy.
Thank you!!!
Saturday, 18 February 2012
Monday, 13 February 2012
CentOs Research Work self study
I am learning install Webmin in CentOs through this website.
http://jazzymarketing.com/main/0805/website-hosting
Webmin homepage
http://webmin.com/vdownload.html
Finally I managed to get the source of Proftpd in CentOs. The Source come from RedHat. I like this so much.
For the 32-bits version of your OS just run the following:
Then following with:
http://jazzymarketing.com/main/0805/website-hosting
Webmin homepage
http://webmin.com/vdownload.html
Finally I managed to get the source of Proftpd in CentOs. The Source come from RedHat. I like this so much.
For the 32-bits version of your OS just run the following:
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm
Then following with:
yum install proftpd
Subscribe to:
Posts (Atom)