Category Archives: LFCE

Docker basic commands

Virtual machines are an abstraction of physical hardware, where hypervisor allow multiple VMs running on the same server. Whereas, Containers are a further level of abstraction on application layer (OS), it packages code and dependencies together. A Linux Container is a lightweight … Continue reading

Posted in docker, LFCE, LFCS

tmux and screen basic commands

tmux: tmux | tmux new -s “mysession”          (Start a new session) tmux ls                       (List sessions) ctrl+b d | exit            (Detach or … Continue reading

Posted in LFCE, LFCS, Linux, Other

Firewalld and iptables commands

i) firewall-cmd (iptables): yum install  firewalld  firewall-config systemctl status|start|stop|enable|disable firewalld firewall-cmd –state firewall-cmd –reload firewall-cmd –list-all | –list-ports firewall-cmd –panic-on |–panic-off    (Block all incoming or outgoing traffic) zones: firewall-cmd  –get-zones|–get-default-zone|–get-active-zone firewall-cmd  –set-default-zone=trusted  [–permanent]  services: firewall-cmd –list-services firewall-cmd –add-service=ftp         [–permanent]  [–zone=public] … Continue reading

Posted in LFCE, LFCS, Linux

Setup NFS and Samba servers in Linux

i) NFS server setup: yum install nfs-utils Create a shared directory and assign appropriate permission: mkdir   -m 777 /nfs   (All users have read,write and execute access) chown  nfsnobody:nfsnobody  /nfs Enter the following into /etc/exports: /nfs   192.168.254.132/24(rw)   192.168.254.0/24(ro) Restart and enable nfs and … Continue reading

Posted in LFCE, LFCS

Setup Squid proxy server in Linux

Squid: Allow access for a local network: yum install squid Add the following in /etc/squid/squid.conf after: # INSERT YOUR OWN RULE(S) HERE acl mynetwork src 192.168.254.0/24 http_access allow mynetwork #http_access allow localnet       (Comment it because it contains 192.168.0.0) squid -k … Continue reading

Posted in LFCE, LFCS, Linux

Setup NTP and Chrony

ntp: yum install ntp Un-comment or add the following lines in /etc/ntp.conf server 0.centos.pool.ntp.org iburst server 1.centos.pool.ntp.org iburst server 2.centos.pool.ntp.org iburst server 3.centos.pool.ntp.org iburst restrict 192.168.254.0 netmask 255.255.255.0 nomodify notrap systemctl start ntpd; systemctl enable ntpd firewall-cmd –add-service=ntp –permanent; firewall-cmd … Continue reading

Posted in LFCE, LFCS

Setup FTP server in Linux

Allow FTP upload for anonymous users: Install FTP server/client and allow it in firewall: yum  install  vsftpd  ftp                 (vsftpd-> server; ftp-> client) systemctl  enable  vsftpd firewall-cmd –add-service=ftp –permanent firewall-cmd –reload Update the following parameters in /etc/vsftpd/vsftpd.conf: … Continue reading

Posted in LFCE, LFCS, Linux | Tagged ,