Notes for Computer Information Technology 160
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

oct22-dns2.md 1.1KB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # October 22 - DNS Continued (and Ports)
  2. ## Overview
  3. - [Local Files](#local-files)
  4. - `/etc/services`
  5. - `/etc/resolv.conf`
  6. - `/etc/nsswitch.conf`
  7. - `/etc/hosts`
  8. - BIND, Domain
  9. - DNS Records
  10. - Zone Files
  11. ## Unix filesystem standards
  12. - bin - binary executables
  13. - sbin - system administator's binary executables
  14. - etc - configuration files
  15. - tmp - temporary files (wiped on boot up)
  16. - var - writable, non-sharable files
  17. ## Local Files
  18. - `/etc/resolve.conf` lists the current dns server for resolving dns requests
  19. - `/etc/hosts` is a local list of dns entries
  20. - `/etc/nsswitch.conf` is the config of the GNU Name Service Switch
  21. ```
  22. # /etc/hosts can be used to block websites:
  23. $ echo '0.0.0.0 example.com' >> /etc/hosts
  24. ```
  25. ## Ports
  26. A socket contains a source and destination ip and port, it lists every
  27. connection.
  28. Ports 0-1024 are "privilege ports" and require root to use.
  29. Port 42 used to be used for WINS, Windows Internet Naming Service, before it was
  30. replaced with regular DNS.
  31. Port 53 is for DNS.
  32. HTTP is on port 80 for the server and for any port over 1024 for the client.