Delete Set public Set private Add tags Delete tags
  Add tag   Cancel
  Delete tag   Cancel
  • • DevOps notes •
  •  
  • AI
  • Tags
  • Login

SSH and DNS/shaare/EvGJOA

  • linux
  • linux

SSH

  • ps -ef | grep sshd → check ssh
  • systemctl status sshd

DNS

  • PTR record → IP to hostname

  • A record → hostname to IP

  • CNAME record → hostname to hostname

  • /etc/named.conf → conf of DNS

  • /var/named/ → file for DNS record

  • systemctl restart named

  • touch forward.lab reverse.lab

  • dig client a in a 192.168.0.240

  • systemctl start named

  • systemctl enable named

Configuring permission

  • chgrp named -R /var/named
  • chown -v root:named /etc/named.conf
  • restorecon -rv /var/named
  • restorecon /etc/named.conf

Test DNS conf

  • named-checkconf /etc/named.conf
  • named-checkzone lab.local /var/named/forward.lab
  • named-checkzone reverse.lab /var/named/reverse.lab

Add DNS info in network file

  • nano /etc/sysconfig/network-scripts/ifcfg-enp0s3

  • DNS=192.168.0.201

  • systemctl restart NetworkManager

  • nano /etc/resolv.conf

  • nameserver 192.168.0.201

Test DNS server

  • dig masterdns.lab.local
  • nslookup masterdns.lab.local

Website lookup

  • nslookup mywebsite.com

    • get IP of a website
  • dig mywebsite.com

    • more info about website
8 months ago Permalink
cluster icon
  • File Display Commands / Filters / Text Processing Input : File Display Commands cat → Show entire content cat -A → Show non-printable characters more → Paginate output less → Same as more but allows navigatio...
  • Journalctl : journalctl journalctl -u sshd show only log for sshd logger hello write in syslog journalctl -f log is live nano /etc/systemd/journald.c...
  • System information, root recovery, environment variables, shortcuts : Finding System Information cat /etc/redhat-release → Red Hat version uname -a → Linux hostname, kernel, architecture dmidecode → hardware, BIOS, syst...
  • Linux filesystem : Directory Description /boot Grub.cfg /root home of root /dev system device (mouse, keyboard) /etc configuration files /bin → /usr/bin e...
  • Ldap Secure Ssh : Check on listening port netstat -tunlp → check open/listening port Securing SSH config more /etc/ssh/sshd_config change port 22 PermitRootLogin ...


(97)
Filter untagged links
Fold Fold all Expand Expand all Are you sure you want to delete this link? Are you sure you want to delete this tag? The personal, minimalist, super-fast, database free, bookmarking service by the Shaarli community