-
-
Save pyaephyohein/694b6ca179bb44dfd538ba503b3d19f6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ########################################################################### | |
| $TTL 3600 | |
| @ IN SOA @ enub2.com. sysadmin.enub2.com. ( | |
| 0 ; serial | |
| 1D ; refresh | |
| 1H ; retry | |
| 1W ; expire | |
| 3H ) ; minimum | |
| NS @ | |
| IN A 192.168.10.29 | |
| www IN A 192.168.10.30 | |
| mail IN CNAME | |
| ############################################################################# | |
| DNS ( Domain Name Service / System) | |
| -DNS => Domain Name Service | |
| -DNS => Naming Service | |
| -DNS => Forward [ IP to Name ] | |
| => Reverse [ Name to IP ] | |
| https://i1.wp.com/www.cialfor.com/infosec/wp-content/uploads/2016/02/hierarchy-of-domain-names.gif | |
| Linux DNS Service | |
| * Forward အတွက် | |
| 1. /etc/named.conf => configure လုပ် zone ဆောက် | |
| 2. cp /var/named/named.localhost /var/named /-------.zone | |
| 3. vi /var/named/------.zone | |
| Record ထည့် | |
| * Reverse အတွက် | |
| 1. /etc/named.conf => configure လုပ် zone ဆောက် | |
| 2. cp /var/named/named.loopback /var/named/---.rev | |
| 3. vi /var/named/-----.rev | |
| Example ############################ | |
| $TTL 1D | |
| @ IN SOA epc.example.com root.epc.example.com. ( | |
| 2017031301 ; serial | |
| 1D ; refresh | |
| 1H ; retry | |
| 1W ; expire | |
| 3H ) ; minimum | |
| $ORIGIN example.com. | |
| example.com. IN NS epc.example.com. | |
| epc IN A 127.0.0.1 | |
| server IN A 192.168.25.1 | |
| www IN CNAME server | |
| mail IN CNAME server | |
| test1 IN A 192.168.25.21 | |
| t1 IN CNAME test1 | |
| test2 IN A 192.168.25.22 | |
| test3 IN A 192.168.25.23 | |
| test4 IN A 192.168.25.24 | |
| ; Mail server MX record | |
| example.com. IN MX 10 mail.example.com. | |
| ######################################################################################### | |
| groupadd apple | |
| useradd tom -g add | |
| useradd jerry -g apple | |
| vim /etc/httpd/conf.d/userdir.conf | |
| userdir disable | |
| userdir public_html | |
| getsebool httpd_read_user_content | |
| setsebool httpd_red_user_content 1 | |
| mkdir /home/tom/public_html | |
| mkdir /home/jerry/public_html | |
| vim /home/tom/public_html/hello.html | |
| vim /home/jerry/public_html/hello.html | |
| chown -R tom:apple /home/tom | |
| chown- R jerry:apple /home/jerry | |
| chmod 701 /home/tom | |
| chmod 701 /home/jerry | |
| chmod 751 /home/tom/public_html | |
| chmod 751 /home/jerry/public_html | |
| chmod 644 /home/tom/public_html/hello.html | |
| chmod 644 /home/jerry/public_html/hello.html | |
| systemctl start httpd | |
| http://host??/~user/hello.html | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment