- Anonymous Download
- #yum install vsftpd
- #service vsftpd restart
- #chkconfig vsftpd on
- Local User Download
- #getsebool -a | grep ftp
- #setsebool -P ftp_home_dir on
- #yum install ftp
- #ftp localhost/<IP>
- Upload
- #vim /etc/vsftpd/vsftpd.conf
- Line 27, --> Uncomment
- anon_upload_enable=yes
- #mkdir /var/ftp/upload
- #chmod g+w /var/ftp/upload
- #chgrp ftp /var/ftp/upload
- Check the content,
- #ls -ldZ /var/ftp/upload ---> public_content_t
- Change the content
- #chcon -t public_content_rw_t /var/ftp/upload
- Change the boolean
- #getsebool -a | grep ftp
- #setsebool -P allow_ftpd_anon_write on
- #service vsftpd restart
- Verification
- #cd /root
- #ftp localhost/<IP>
- #ls ---> pub & upload
- #cd upload
- #mput install.log
- Iptable Rules
- Clients outside example.com should not have access to your FTP service (IP & subnet will be given)
- #iptables -I INPUT ! -s example.com -p tcp --dport 21 -j REJECT
Wednesday, 4 September 2013
Configuring FTP (Download/Upload)
Export a directory via NFS
- Create a directory eg. /comon
- #mkdir /common
- Install package
- #yum install nfs-utils
- Change Mode(chmod) of the directory
- #chmod 777 /common
- Make entry in the /etc/exports file
- #vim /etc/exports
- (r,w) access only to 192.168.0.1 Network
- /common 192.168.0.1/255.255.255.0(rw,sync)
- (r) access to all
- /common *(ro,sync)
- give access to root on host 192.168.0.25
- /common 192.168.0.25(rw,no_root_sqash,sync)
- NFS to example.com domain only
- /common *.example.com(rw,sync)
- Save & quit
- Restart nfs
- #service nfs restart
- #chkconfig nfs on
- To verify,
- Virtual M/c #showmount -e localhost
Tuesday, 3 September 2013
Configuring SSH
1: Search if the package is laready installed.
#rpm -qa | grep ssh
2: #yum search ssh
3: #yum install openssh-server
4: Make sure you flush iptables before setting any new iptables rule
5: Don't flush your iptables in the middle/end else all your set iptables
#iptables -F
#service iptables save
#service iptables restart
Setting IPTABLE Rules
6: Clients within remote.test should not have SSH access to your system
#iptables -I INPUT -s <remote.test n/w address> -p tcp --dport 22 j REJECT
7: Only 192.168.0.1/255.255.255.0 should have SSH access
#iptables -I INPUT ! -s 192.168.0.1/255.255.255.0 -p tcp --dport 22 -j REJECT
8: 192.168.0.1/255.255.255.0 should have SSH access
#iptables -I INPUT -s 192.168.0.1/255.255.255.0 -p tcp --dport 22 -j ACCEPT
#rpm -qa | grep ssh
2: #yum search ssh
3: #yum install openssh-server
4: Make sure you flush iptables before setting any new iptables rule
5: Don't flush your iptables in the middle/end else all your set iptables
#iptables -F
#service iptables save
#service iptables restart
Setting IPTABLE Rules
6: Clients within remote.test should not have SSH access to your system
#iptables -I INPUT -s <remote.test n/w address> -p tcp --dport 22 j REJECT
7: Only 192.168.0.1/255.255.255.0 should have SSH access
#iptables -I INPUT ! -s 192.168.0.1/255.255.255.0 -p tcp --dport 22 -j REJECT
8: 192.168.0.1/255.255.255.0 should have SSH access
#iptables -I INPUT -s 192.168.0.1/255.255.255.0 -p tcp --dport 22 -j ACCEPT
Automounting of iso file/CD-ROM
1: Download the .iso file
#wget <file_name>
2: Mount Point should be given
3: Make /etc/fstab entry
#vim /etc/fstab
/root/image.iso /mnt iso9660 loop,ro 0 0
4: save & quit
5: #mount -a
#wget <file_name>
2: Mount Point should be given
3: Make /etc/fstab entry
#vim /etc/fstab
/root/image.iso /mnt iso9660 loop,ro 0 0
4: save & quit
5: #mount -a
Saturday, 6 July 2013
Installing New Kernel
- You will be given the ftp URL where the kernel is available.
- Open that URL in different tab
- Note down your current kernel name in PAPER (#uname -r)
- Download all the kernel files(kernel-*) using #wget from the given URL i.e. opened in different tab of base m/c
- Note: Ideally 2 files will be there inside the kernel directory of the given URL: eg
- 1: kernel-<version>.rpm
- 2: kernel-firmware-<version>.rpm
- write down the new kernel version which is going to be installed in the PAPER
- It will be downloaded into the current directory
- Install it using #rpm
- #rpm -ivh kernrl-* --force --->may take 2-3 mins to install
- Check in file
- #vim /boot/grub/grub.conf
- <you will see 2 kernels in the kernel/Title section, old & new. For the system to install with new kernel, defaults=0 (zero) , so first one should be the new kernel which is required>
- #reboot
- To verify press esc and verify your kernel name which is going to boot.
- After booting is done, verify the new kernel (#uname -r)
Friday, 5 July 2013
Configure variable=value(sysvctl=1) in kernel Parameter
In exam question would be asked to ensure sysvctl=1 is available as a kernel parameter and it should reflect in /proc/cmdline
Make the corresponding changes in
#vim /boot/grub/grub.conf
<update the required thing eg . sysvctl=1 at the end of kernel section,>
save & quit
Note: This question will come after installing the new kernel question
Make the corresponding changes in
#vim /boot/grub/grub.conf
<update the required thing eg . sysvctl=1 at the end of kernel section,>
save & quit
Note: This question will come after installing the new kernel question
Subscribe to:
Posts (Atom)

