LINUX
2019.10.30 12:23

Ubuntu TFTP 서버

조회 수 6972 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print

TFTP 서버 구축

 

# yum install tftp tftp-server

 

# useradd -m -d /app/tftproot tftpd

 

# vi /etc/xinetd.d/tftp

# default: off

# description: The tftp server serves files using the trivial file transfer \

#         protocol.  The tftp protocol is often used to boot diskless \

#         workstations, download configuration files to network-aware printers, \

#         and to start the installation process for some operating systems.

#

service tftp

{

        socket_type             = dgram

        protocol                = udp

        wait                    = yes

        user                    = root

        server                  = /usr/sbin/in.tftpd

#        server_args             = -s /app/tftproot

server_args             = -c -p -u tftpd -U 117 -s /app/tftproot

        disable                 = no

        per_source              = 11

        cps                     = 100 2

        flags                   = IPv4

}

 

# service xinetd restart

 

[원도우 클라이언트 : bb.txt 다운로드]

C:\Users\Administrator>tftp -i 192.168.56.108 get bb.txt

전송 완료: 1초에 0바이트, 0바이트/

 

[원도우 클라이언트 : windows.txt 업로드]

C:\Users\Administrator>tftp -i 192.168.56.108 put windows.txt

전송 완료: 1초에 11바이트, 11바이트/

 

[리눅스 클라이언트 : bb.txt 다운로드]

# tftp 192.168.56.108

tftp> get bb.txt

 

[리눅스 클라이언트 : linux.txt 업로드]

# tftp 192.168.56.108

tftp> put linux.txt






 [Ubuntu] tftp 설치 및 설정  +   [Desktop/Linux]   |  2013.06.21 15:39

출처 : http://forum.falinux.com/zbxe/index.php?document_srl=518293&mid=lecture_tip


tftp는 우분투에서 시냅스 꾸러미 관리자를 이용하는 것 보다는 apt-get install을 직접 사용하는 것이 편하더군요.

~$ sudo apt-get install xinetd tftp tftpd

설치 후에는 tftp를 사용하기 위한 /etc/xinetd.d/tftp 파일을 생성합니다.

~$ sudo vi /etc/xinetd.d/tftp
service tftp
{
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /tftpboot
    disable         = no
    per_source      = 11
    cps             = 100 2
    flags           = IPv4
}

tftp에서 파일을 제공할 때 사용하는 디렉토리를 생성합니다.

~$ sudo mkdir /tftpboot
~$ sudo chmod 777 /tftpboot

이제 tftp 서버 실행을 위한 준비는 모두 끝났습니다. 서버를 다시 실행하고 테스트해 보겟습니다.

~$ sudo /etc/init.d/xinetd restart

/tftpboot에 파일을 만들고 다른 디렉토리로 이동하여 파일을 받아 보겠습니다.

~$cd /tftpboot
~$ vi test.txt

     아무런 문자열을 입력하고 저장한 후, VI 에디터를 종료합니다.
     
~$ cd /tmp                       // 임시 디렉토리로 이동
~$ tftp localhost                // tftp 서버와 연결
tftp> get test.txt               // test.txt 다운로드
Received 6 bytes in 0.0 seconds
tftp> quit
~$ ls -al                        // 다운 받은 파일 확인
합계 76
drwxrwxrwt 14 root root  4096 2009-05-25 13:35 .
drwxr-xr-x 22 root root  4096 2009-05-25 13:30 ..
drwxrwxrwt  2 root root  4096 2009-05-25 13:26 .ICE-unix
-r--r--r--  1 root root    11 2009-05-25 13:22 .X0-lock
drwxrwxrwt  2 root root  4096 2009-05-25 13:22 .X11-unix
drwx------  2 jwjw jwjw  4096 2009-05-25 13:26 .esd-1000
drwx------  2 jwjw jwjw  4096 2009-05-25 13:27 ssh-CxzfZm6269
-rw-r--r--  1 jwjw jwjw     5 2009-05-25 13:35 test.txt
-rw-------  1 root root     0 2009-05-25 13:22 tmp.btyMJW5940
~$ cat test.txt                 // 내용 출력
tftp로 전송할 파일
~$

이렇게 파일을 수신이 되면 정상적으로 tftp 서버가 설치된 것입니다.





============================================================================




출처: http://rookiecj.tistory.com/256



보드에 다운로드 하기 위해서 ubuntu에 tftp daemon을 돌릴려고 했는데 그 과정이 참 고생스러웠다.

웹 서핑결과 tftpd 설정은 크게 
1. tftpd를 이용하는 방법과
2. tftpd-hpa를 이용하는 방법
3. xinetd + tftpd-hpa
으로 나뉜다.

but 2가지 다 현재 버전과는 맞지 않고 3번째 방법으로 성공

패키지 설치
$ sudo apt-get install xinetd tftpd-hpa
 
xinetd 설정
$ sudo vi /etc/xinetd.d/tftp

service tftp
{
protocol=udp
port=69
socket_type=dgram
wait=yes
user=nobody
server=/usr/sbin/in.tftpd
server_args= -s /tftpboot
disable= no
}

tftpd-hpa 설정
$ sudo vi /etc/default/tftpd-hpa
 #/etc/default/tftpd-hpa

TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS="0.0.0.0:69"
TFTP_OPTIONS="--secure --create"

서비스 시작
$ sudo service xinetd restart
$ sudo stop tftpd-hpa
$ sudo start tftpd-hpa
 
port확인
69번 포트가 open되어 있는지 확인
$ netstat -anu

Proto Recv-Q Send-Q Local Address           Foreign Address         State      
udp        0      0 0.0.0.0:68              0.0.0.0:*                          
udp        0      0 0.0.0.0:69              0.0.0.0:*              


접속 확인
Vista에서 tftpd.exe를 이용해서 download확인
 

1133A04E4E0DCF332D



출처: https://rednine.tistory.com/689 [Chune's....]

출처: https://rednine.tistory.com/689 [Chune's....]

출처: https://rednine.tistory.com/689 [Chune's....]



------------------------------------------------------------


https://m.blog.naver.com/jungiltae/90175076483


라즈베리파이 TFTP 서버 설정



TFTP 설치

$sudo apt-get install xinetd tftp tftpd

 

TFTP설정 파일

$ sudo vi /etc/xinetd.d/tftp

 

설정파일내용

service tftp
{
    socket_type     = dgram
    protocol        = udp
    wait            = yes
    user            = root
    server          = /usr/sbin/in.tftpd
    server_args     = -s /tftpboot
    disable         = no
    per_source      = 11
    cps             = 100 2
    flags           = IPv4

TFTP 디렉토리 생성

$ sudo mkdir /tftpboot
$ sudo chmod 777 /tftpboot

 

TFTP 재실행

$ sudo /etc/init.d/xinetd restart

 

TFTP Test

$cd /tftpboot
$ vi test.txt

$ cd /tmp                       // 임시 디렉토리로 이동~$ tftp localhost // tftp 서버와 연결
tftp> get test.txt             // test.txt 다운로드
tftp> quit
$ls


Dreamy의 코드 스크랩

내가 모으고 내가 보는

List of Articles
번호 분류 제목 날짜 조회 수 추천 수
476 LINUX Ubuntu php5.6 , php7.1 설치 및 셋팅하기 2020.02.11 5036 0
475 LINUX Ubuntu apt-get 명령어 정리 2020.02.11 3902 0
474 LINUX 우분투(Ubuntu) 설치된 패키지 목록 확인하기 2020.02.11 20057 0
473 일반 온습도, 미세먼지 정보 받아오기 secret 2020.01.10 0 0
472 Pi 아두이노 데이터 저장하기(Arduino EEPROM 사용하기) 2019.12.24 17499 0
471 LINUX mutt Gmail 설치, 사용 / Ubuntu 18.04 환경 2019.11.25 4927 0
470 LINUX 리눅스 명령행에서 메일 보내기(send mail from linux command line) 2019.11.25 8927 0
» LINUX Ubuntu TFTP 서버 2019.10.30 6972 0
468 Pi 레귤레이터(3.3V 1A) KA78R33 데이터시트 file 2019.08.20 3646 0
467 Pi 회로부품 메모 1 secret 2019.08.09 1 0
466 Pi OP AMP의 활용 2019.08.05 9671 0
465 Python Image 기반 Steganography 예제 1 2019.07.17 25210 0
464 업무 Pen Testing 툴 요약 secret 2019.07.16 0 0
463 일반 SQL Injection 우회 정리 2019.07.10 7902 0
462 C C에서 파일 존재여부 체크 (check file exist) 2019.07.02 18311 0
목록
Board Pagination ‹ Prev 1 2 3 4 5 6 7 8 9 10 ... 34 Next ›
/ 34

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Designed by sketchbooks.co.kr / sketchbook5 board skin

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5