Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Forward parsing script for shell

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Forward parsing script #! / bin/bashyum install bind-y / / install parsing toolkit / / modify the main configuration file sed-I '13sUniple 127.0.0.1 etc/named.conf / / change the IP address on line 13 of the parsing main configuration file to 192.168.17.156sed-I '21slocalhosthand anyhand' / etc/named.conf / / change the main configuration file Replace line 21 localhost with any// to add content to the zone configuration file sed-I '24azone "cwq.com" IN {\ n type master \ nfile "cwq.com.zone";\ nallow-update {none;};\ n} Add the domain name cd / var/named cp-p named.localhost cwq.com.zone / / copy template to our own data region configuration file / / configure the data region configuration file sed-I'2s cwq.com.zonesed after line 24 of the / cwq.com.zonesed zone configuration file. -I '8s 10aIN MX 10aIN MX cwq.com.Universe 'cwq.com.zonesed-I' 9s cwq.com.zonesystemctl stop firewalld.service 127.0.0.1On192.168.17.156 @ cwq.com.zonesed-I 'Universe 10 mail.cwq.com.\ nwww IN A 192.168.100.99\ nftp IN A 192.168.100.88' cwq.com.zonesystemctl stop firewalld.service / / turn off firewall setenforce 0 / / turn off the enhanced systemctl start named / / enable parsing service Echo "nameserver 192.168.17.156" > / etc/resolv.conf / / add your own Ip address to the resolution configuration file. Finally, just type hosts www.cwq.com to resolve the address 192.168.17.156.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report