Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
root@debian8:~# apt install tftpd-hpa
root@debian8:~# chown tftp /srv/tftp
root@debian8:~# sed -i.oryginal "s/--secure/--secure --create/g" /etc/default/tftpd-hpa 

### upewnij się, że konfiguracja wygląda następująco:
root@debian8:~# cat /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa

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

### zrestartuj serwis aby pobrał najnowszą konfigurację:
root@debian8:~# systemctl restart tftpd-hpa

### upewnij sie ze usluga dziala
root@debian8:~# systemctl status tftpd-hpa
● tftpd-hpa.service - LSB: HPA's tftp server
   Loaded: loaded (/etc/init.d/tftpd-hpa)
   Active: active (running) since Sat 2017-02-11 16:35:44 GMT; 2min 8s ago
  Process: 9984 ExecStop=/etc/init.d/tftpd-hpa stop (code=exited, status=0/SUCCESS)
  Process: 9989 ExecStart=/etc/init.d/tftpd-hpa start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/tftpd-hpa.service
           └─9995 /usr/sbin/in.tftpd --listen --user tftp --address 0.0.0.0:69 --secure --create /srv/...

Feb 11 16:35:44 debian8 systemd[1]: Starting LSB: HPA's tftp server...
Feb 11 16:35:44 debian8 tftpd-hpa[9989]: Starting HPA's tftpd: in.tftpd.
Feb 11 16:35:44 debian8 systemd[1]: Started LSB: HPA's tftp server.

### i że nasłuchuje na porcie 69 UDP
root@debian8:~# netstat -lunp | grep :69
udp        0      0 0.0.0.0:69              0.0.0.0:*                           9995/in.tftpd  

...