Tftp-hpa: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
 
Zeile 16: Zeile 16:
  
 
=Firewall anpassen=
 
=Firewall anpassen=
IP="192.168.240.1 192.168.240.56"
+
IP="192.168.240.1 192.168.240.56"
for IP in TFTPLIST
+
for IP in TFTPLIST
do
+
do
iptables -A INPUT -p udp -s $IP --dport 69  -j ACCEPT
+
  iptables -A INPUT -p udp -s $IP --dport 69  -j ACCEPT
done
+
done
  
 
=Die Firewall des Client muss TFTP handlen können=
 
=Die Firewall des Client muss TFTP handlen können=
 
*/sbin/modprobe ip_nat_tftp
 
*/sbin/modprobe ip_nat_tftp
 
*/sbin/modprobe ip_conntrack_tftp
 
*/sbin/modprobe ip_conntrack_tftp

Aktuelle Version vom 19. April 2016, 14:24 Uhr

Installation

  • apt-get install tftpd-hpa

kontrolle

  • netstat -lnup | grep "\<69\>"
udp6       0      0 :::69                   :::*                                30951/in.tftpd

Anpassen so das man auch Dateien hochladen kann

  • cat /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/var/lib/tftpboot"
TFTP_ADDRESS="[::]:69"
TFTP_OPTIONS="--secure -c"

Rechte ändern

  • chmod 777 /var/lib/tftpboot/

Neustarten

  • service tftpd-hpa restart

Firewall anpassen

IP="192.168.240.1 192.168.240.56"
for IP in TFTPLIST
do
 iptables -A INPUT -p udp -s $IP --dport 69   -j ACCEPT
done

Die Firewall des Client muss TFTP handlen können

  • /sbin/modprobe ip_nat_tftp
  • /sbin/modprobe ip_conntrack_tftp