Göm menyn

TDDI41 Grundläggande systemadministration

Ht1-Ht2 2023


  • Introduction TDP031
  • Lecture 2 Networking
  • Lecture 3- Directory Services (NIS/NIS+,LDAP,DNS)
  • BIND and Storage
  • Lecture 4 - Configuration Mangement
  • Network revisted

    Router settings:

    	      echo 1 > /proc/sys/net/ipv4/ip_forward
    	      iptables -t nat -I POSTROUTING -o eth0 -j MASQUERADE 

    Setting ip-address example (/etc/network/interfaces)
    	      auto lo eth0
    	      iface lo inet loopback
    	      iface eth0 inet static
  • SSH tips
    • Passwordless login
                    #Generate key(s) (on the machine you want to ssh from)
                    #copy pulic keys to the machines you want to ssh to
                    router%>ssh-copy-id -i ~/.ssh/id_rsa.pub root@machine
    • SSH Jumphost
                    #You can connect to a target machine (server,client1/2) by using your router as a Jumphost
                    ida%>ssh -J root@ root@
                    #To be able to do this without using password you need to
                    #copy your public-key from your IDA-folder to all your machines.
    • SSH config
  • DNS basics


    zone "anders.rune.com" {
    	type master;
    	file "/etc/bind/zones/anders.rune.com";
    zone "100.168.192.in-addr.arpa" {
    	type master;
    	file "/etc/bind/zones/reverse/rev.100.168.192";


    root@uml-root-jessie:~# cat /etc/bind/zones/anders.rune.com
    $TTL 1h
    @ 	IN	SOA ns1.anders.rune.com. andla.anders.rune.com.(
    		201811223 ; SERIAL
    		2h	  ; Refresh
    		1h	  ; Retry
    		1w	  ; Expire
    		1h	) ;Minium
    @	IN 	NS 	ns1.anders.rune.com.
    @	IN 	NS 	ns2.anders.rune.com.
    anders.rune.com. IN 	A
    ns1		 IN 	A
    ns2		 IN	A
    server		 IN	CNAME	anders.rune.com.
    client1		 IN	A
    client2		 IN	A
    lars.anders.rune.com. IN NS	ns1.lars.anders.rune.com.
    ns1.lars.anders.rune.com. A

Sidansvarig: Anders Fröberg
Senast uppdaterad: 2022-09-28