Posted in Linux, Linux Foundation (LFCE & LFCS)

LFCE Catatan 1

LFCE adalah salah satu sertifikasi linux yang dikeluarkan oleh linuxfoundation.org. Linuxfoundation menyediakan Cerfification Preparation Guide yang bisa anda download di link https://training.linuxfoundation.org/download-free-certification-prep-guide. Berikut catatan-catatan sederhana yang saya kumpulkan sebagai materi belajar saya.🙂

LFCE

Centos 6
#yum search telnet
#yum install -y telnet-server
#yum install -y telnet
#rpm -q telnet-server
#which telnet
#chkconfig | more
#chkconfig | grep -i telnet
#chkconfig | grep -i xinetd
#chkconfig xinetd on
#service xinetd status
#service xinetd start
#chkconfig telnet on
#telnet localhost -> SUCCESS
#chkconfig telnet off
#service xinetd stop
#telnet localhost -> FAIL

 Centos 7
#yum search telnet
#yum -y install telnet-server
#yum -y install telnet
#rpm -q telnet-server
#systemctl | more
#systemctl | grep -i telnet
#systemctl status telnet-server -> Failed to execute operation: Access denied
#systemctl enable telnet.socket
-> Created symlink from /etc/systemd/system/sockets.target.wants/telnet.socket to /usr/lib/systemd/system/telnet.socket.
#telnet localhost
-> Trying 127.0.0.1…
telnet: connect to address 127.0.0.1: Connection refused
#ss -tnlp | grep 2[23] -> service telnet di port 23 belum berjalan
#whatis ss -> another utility to investigate sockets
#systemctl start telnet.socket
#ss -tnlp | grep 23 -> service telnet di port 22 sudah berjalan
#telnet localhost -> sudah bisa login
#systemctl status telnet.socket
#systemctl stop telnet.socket
#systemctl disable telnet.socket
#telnet localhost -> tidak bisa login karena service telnet di stop
systemctl = System Control

#iptables -nvL {-n = number, -v = verbose, -L = list}
#iptables -L | grep FORWARD
#iptables -P FORWARD DROP {-P = Policy}
#iptables -L | grep FORWARD
#iptables –flush ATAU iptables -F
#iptables -L
#iptables -P FORWARD ACCEPT
#iptables -L | grep FORWARD

REJECT & DROP PING ICMP
IP 1 : 192.168.65.128 : Centos 7
IP 2 : 192.168.65.130 : Centos 6
Centos7#iptables -A INPUT –protocol icmp –in-interface eth0 -j DROP
#iptables -L | grep DROP
#ping 192.168.65.128 -> No Output
Centos6#ping 192.168.65.128

Centos7#iptables –flush
iptables -A INPUT –protocol icmp –in-interface eth0 -j REJECT
iptables -L | grep REJECT -> Destination Port Unreachable
Centos6#ping 192.168.65.128 -> Destination Port Unreachable

#man ss
#whatis ss
#ss info
#ss –help
#ss -t -a
#ss -t -o
#ss -tn sport = :22
#ss -tn sport = :ssh

#yum -y install nmap
#nmap -A t
#nmap -A localhost
#nmap -A -sS localhost

#yum -y install iptraf -> IP Traffic Monitor GUI
#iptraf
#yum -y install dstat
#dstat

dstat

#top
#yum -y install htop
#htop -> top dengan tampilan yang lebih berwarna🙂

htop
#free
#free -m
#df
#df -h
#df
#df -hTi
#du -sch /var/*
#ps ef | grep -i postfix
#ps aux | grep -i postfix | grep -v grep -> menghilangkan output grep
#ps aux | grep apache
#ps aux | grep httpd | grep -v grep | wc -l
#dmesg -> Driver loaded, address, hardware, etc
#cd /var/log; ls -alth
#cd /var/log; tail messages

#apt-get install openssh-server
#vim /etc/ssh/sshd_config
#PermitRootLogin without-password = comment
#PermitRootLogin yes
#/etc/init.d/ssh restart
Quagga adalah sebuah aplikasi yang digunakan untuk aplikasi routing protokol. Bagian quagga ada beberapa macam:
1. Zebra                      : merupakan bagian penghubung antara linux kernel dengan aplikasi routing protokol.
2. Routing Daemon : merupakan aplikasi pengatur routing protokol.
Misal: ospfd adalah daemon yang mengatur routing protocol OSPF, ripd adalah daemon yang mengatur routing protokol RIP.
#yum install quagga
#apt-get install quagga
#cd /etc/quagga; ls
#vim daemons -> masukkan config seperti dibawah ini
zebra=1
bgpd=no
ospfd=no
ospf6d=no
ripd=1
ripngd=no
isisd=no
vim zebra.conf
password quagga
vim ripd.conf
password quagga
netstat -tanp | grep zebra -> melihat port zebra 2601
netstat -tanp | grep ripd   -> melihat port zebra 2602

ll -> ubah group dari root ke quagga
#cat /etc/passwd | grep -i quagga   -> melihat user quagga
#cat /etc/group | grep -i quaggavty -> melihat group quagga
#chown quagga:quaggavty *.conf
#chmod 640 *.conf;ll
#service quagga restart

Jika telnet belum bisa dapat menginstal dapat menginstal xinetd dan telnetd
#sudo apt-get install xinetd telnetd
#/etc/init.d/xinetd restart
ifconfig
telnet localhost 2601 -> masukkan password quagga
> enable
# configure terminal
# interface eth0
# ip addr 192.168.65.133/24
# write
#exit atau ctrl+d

telnet localhost 2602 -> masukkan password quagga
> enable
# configure terminal
# router rip
# version 2
# network 192.168.65.0/24
# write
#exit atau ctrl+d

#cd /etc/quagga; cat ripd.conf
#show ip route
#ip route show
#ping google.com
setingan lebih lanjut dapat dilihat di http://cyberlearning.web.id/wiki/index.php/TCP/IP:_Quagga_OSPF6_untuk_IPv6

Author:

Teman yang baik, teman yang memaksa anda untuk terus berkembang...

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s