Difference between revisions of "Tftp"

From Klaus' wiki
Jump to: navigation, search
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
To enable tftp on your Centos server perform the following:
+
To enable tftp on your Centos server perform the following as '''root''':
  
 
<source lang="bash">
 
<source lang="bash">
Line 5: Line 5:
 
$ chmod 777 /tftpboot
 
$ chmod 777 /tftpboot
 
$ vi /etc/xinetd.d/tftp ## Change disable = yes to disable = no
 
$ vi /etc/xinetd.d/tftp ## Change disable = yes to disable = no
$ restorecon -r /tftpboot
+
$ /sbin/restorecon -r /tftpboot
 
$ system-config-securitylevel-tui ## add tftp:udp in the customize menu for other ports
 
$ system-config-securitylevel-tui ## add tftp:udp in the customize menu for other ports
 
$ service network restart
 
$ service network restart
 
$ service xinetd restart
 
$ service xinetd restart
 
 
 
 
$ echo "test">/tftpboot/test
 
$ echo "test">/tftpboot/test
 
$ tftp localhost ## command: get test
 
$ tftp localhost ## command: get test
Line 18: Line 15:
 
check that the file test is received locally.
 
check that the file test is received locally.
  
On bren try to get the test file as well. If you receive it everything is working correct.
+
Unfortunately we cannot test this from bren because the tftp implementation are using random selected ports.
 +
 
 +
+-------------+                        +--------------+
 +
|            |                        |              |
 +
|            | port xx                |              |
 +
|  bren      |----------------------->| devhost      |
 +
|            |            port 69/udp |              |
 +
|            |                        |              |
 +
+-------------+                        +--------------+
 +
 +
+-------------+                        +--------------+
 +
|            |                        |              |
 +
|            |            port xx    |              |
 +
|  bren      |<-----------------------| devhost      |
 +
|            | port nn                |              |
 +
|            |                        |              |
 +
+-------------+                        +--------------+
 +
where nn is randomly selected and with almost 100% certainty not open in the bren firewall.
 +
(Remember: The source port (xx) does not cause any problems.)
 +
 
 +
If you have a PC with fully open firewall you can test the setup - maybe momentary switch off your firewall for the test - provided you have a tftp client installed on your PC.
 +
 
 +
The EA 2478 board '''will''' work under these conditions, because uBoot accepts incoming tftp traffic on any port.

Latest revision as of 10:47, 27 February 2013

To enable tftp on your Centos server perform the following as root:

$ yum install tftp*
$ chmod 777 /tftpboot
$ vi /etc/xinetd.d/tftp ## Change disable = yes to disable = no
$ /sbin/restorecon -r /tftpboot
$ system-config-securitylevel-tui ## add tftp:udp in the customize menu for other ports
$ service network restart
$ service xinetd restart
$ echo "test">/tftpboot/test
$ tftp localhost ## command: get test

check that the file test is received locally.

Unfortunately we cannot test this from bren because the tftp implementation are using random selected ports.

+-------------+                        +--------------+
|             |                        |              |
|             | port xx                |              |
|   bren      |----------------------->| devhost      |
|             |            port 69/udp |              |
|             |                        |              |
+-------------+                        +--------------+

+-------------+                        +--------------+
|             |                        |              |
|             |            port xx     |              |
|   bren      |<-----------------------| devhost      |
|             | port nn                |              |
|             |                        |              |
+-------------+                        +--------------+
where nn is randomly selected and with almost 100% certainty not open in the bren firewall. 
(Remember: The source port (xx) does not cause any problems.)

If you have a PC with fully open firewall you can test the setup - maybe momentary switch off your firewall for the test - provided you have a tftp client installed on your PC.

The EA 2478 board will work under these conditions, because uBoot accepts incoming tftp traffic on any port.