Skip to main content

마스터 네임서버 만들기

 

apache 설치하기

설치후 재가동

설치후 활성

방화벽 규칙 추가

#apt -y install apache2

#systemctl restart apache2

#systemctl status apache2

#systemctl enable apache2

#ufw allow 80/tcp

 

아파치 웹서버의 루트 폴더는 /var/www/html/ 경로가 된다.

mv /var/www/html/index.html index_bak.html   이름을 변경해서 index_bak.html 로 변경한다. 

#nano /var/www/html/index.html 신규 index.html 파일을 생성한다.




<h1> ubuntu web server </h1>

 


serverB (텍스트모드 리눅스)에서 ftp프로그램 설치

#apt -y install vsftpd

#ufw allow 21  (방화벽포트 열기)

#cd /srv/ftp/ 폴더 이동해서 touch명령어로 welcome.msg 파일을 생성하고 내용 입력

#nano welcome.msg

################
welcome..ubuntu ftp
##################

#nano -c /etc/vsftpd.conf

(nano -c 옵션은 행라인과 전체 라인의 숫자를 %형태로 보여준다.)

vsftpd.conf 문서내에서

anonymous_enable=NO를 YES로 변경

banner_file=/srv/ftp/welcome.msg  환영메세지를 설정한다.

 


서버 컴퓨터의 문서수정

#nano /etc/bind/named.conf

 

가장 아랫줄에 아래 내용 추가

zone "john.com" IN {
           type master;
           file "/etc/bind/john.com.db";
};

 

오타 여부 확인

#named-checkconf

 

john.com 가상도메인 등록하기

john.com.db 생성하기

 

#cd /etc/bind/    이동해서

#touch john.com.db  생성하고 nano로 아래와 같이 수정한다.

절대 오타 금지

 

$TTL     3H

@           IN     SOA     @      root.  ( 2  1D   1H   1W   1H  )

@           IN     NS      @

            IN      A      192.168.111.100




www      IN       A        192.168.111.100

ftp      IN       A        192.168.111.200

 

네임서버 및 웹서버를 같이 작동할 수 있도록 설정화일은 모두 제작하였고 ftp는 200번 서버로 연결되도록 작업

 

#named-checkzone john.com john.com.db  (로딩 체크)

 

 

 

 

 

 

 

 

 

 

 

 

Leave a Reply