11.linux DNS server builds and installs Apache

dnsServer establishment

1.Install bind to build DNS server

    yum install bind -y
2.Install and modify the configuration file: VIM /etc/named.conf
  Modification:
       listen-on port 53 { 192.168.1.145; }; Here IP is the server host IP.
       #allow-query     { localhost; };
  Specify DNS parsing:
      vim /etc/named.conf Add new analytic domain
 
      zone “simplexue.com” IN {
      type master;                                      Main resolution: Master
      file “simplexue.com.zone“;
      };
  Save configuration files
3.named-checkconf    Syntax error detecting configuration files
 
4.Build analytical files
   vim /var/named/simplexue.com.zone The permission group is named, which has read permission.
      The example file is: named.localhost
  Because the new parsing file must remain unchanged, so use the CP -a command.
   Copy instance files using CP -a commandnamed.localhostAnd change the name:
   cp -a named.localhost ismplexue.com.zone
 
 5.Fill in the following contents (red in the revision Office)

  $TTL 1D                                  Effective life cycle
          @ IN SOA simplexue.com. allen.simplexue.com. (           Domain information: root domain information. Administrator information (mailbox)
              2017011901        Version information of file Z
              1D                        Update time
              1H
              1W
              3H
          )
      NS dns.simplexue.com.  Define the name of the DNS server for the domain name.
      dns A 192.168.1.145
      www A 192.168.1.145
 6.named-checkconf  -z  Syntax error detecting configuration file area file
  Open httpd
  When the intranet host DNS address is this server, you can control the resolution of its domain name, you can also construct phishing sites.
 
 
Install Apache
 
1.yum install httpd
 
    Boot script is
    /etc/init.d/httpd
 
    The main configuration file is
   /etc/httpd/conf/httpd.conf
 
    The default home page file is stored as directory.
    /var/www/html
 
    Log file storagePlacement path
    /var/log/httpd/
 
2. apacheService configuration
    vim /etc/httpd/conf/httpd.conf     apacheMain configuration file
 You can set up the access policy of the server in the main configuration file of Apache.<Directory “/var/www/html”>Functions of various parts:
  <Directory “/var/www/html”>
            Options Indexes FollowSymLinks   IndexesIs the function of enabling directory shared files.
            AllowOverride None
    #    Order allow,deny   Access control policy allows first refusal.
    #    Allow from all     Default allow all
        Order deny,allow
        Deny from 10.0.     Refusal can specify network segment form refusal.
 
 
        AuthName “welcome to simplexue” Login prompt
        AuthType Basic   Type of projectile frame
        AuthUserFile /etc/httpd/conf/.usrlist  Verification file
        require valid-user   Valid user login
    </Directory>
  Set the username and password of the valid user:
 
    htpasswd -c /etc/httpd/conf/.usrlist User name
    Password
 
1.dnsDeception analysis, through the configuration of the local DNS can parse www.simpleware.comThe visited website is the home page of the local HTTP service. It can not affect access to other home pages parse.
 
2.When visiting the home page through the domain name, the pop-up prompt box asks for the user name and password. Admin password 123456.
 
 
 
 

Leave a Reply

Your email address will not be published. Required fields are marked *