Notes for Computer Information Technology 160
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符 1.1KB

October 22 - DNS Continued (and Ports)


  • Local Files
    • /etc/services
    • /etc/resolv.conf
    • /etc/nsswitch.conf
    • /etc/hosts
  • BIND, Domain
  • DNS Records
  • Zone Files

Unix filesystem standards

  • bin - binary executables
  • sbin - system administator’s binary executables
  • etc - configuration files
  • tmp - temporary files (wiped on boot up)
  • var - writable, non-sharable files

Local Files

  • /etc/resolve.conf lists the current dns server for resolving dns requests
  • /etc/hosts is a local list of dns entries
  • /etc/nsswitch.conf is the config of the GNU Name Service Switch
# /etc/hosts can be used to block websites:
$ echo '' >> /etc/hosts


A socket contains a source and destination ip and port, it lists every connection.

Ports 0-1024 are “privilege ports” and require root to use.

Port 42 used to be used for WINS, Windows Internet Naming Service, before it was replaced with regular DNS.

Port 53 is for DNS.

HTTP is on port 80 for the server and for any port over 1024 for the client.