On 05/01/2011 10:13 AM, Henning Brauer wrote:
* Emille Blanc<sar...@sarlok.com>  [2011-04-30 19:56]:
since TFTP uses UDP, pf won't create a state
wrong.

Hello, I'm stuck again with "no route to host"
# uname -a
OpenBSD gw 5.2 GENERIC.MP#339 i386
# ls -la /usr/tftpboot/
total 12728
drwxrwxrwx   2 root  wheel      512 Jan 10 15:36 .
drwxr-xr-x  18 root  wheel      512 Jan 10 14:48 ..
-rwxrwxrwx   1 root  wheel        3 Jan 10 15:35 1.txt
-rwxrwxrwx   1 root  wheel  6427696 Feb 13  2012 bsd.rd
-rwxrwxrwx   1 root  wheel    53732 Feb 13  2012 pxeboot
# pfctl -sr | grep 69
pass in quick on em0 inet proto udp from any to any port = 69
pass out quick on em0 inet proto udp from any to any port = 69

from localhost:
# tftp
tftp> connect 192.168.5.254
tftp> get 1.txt
Received 3 bytes in 0.0 seconds
tftp> get pxeboot
Received 54044 bytes in 0.0 seconds
tftp> quit
# ls -la | grep 1.txt
-rw-r--r--   1 root  wheel        3 Jan 10 17:14 1.txt
# ls -la | grep pxeboot
-rw-r--r--   1 root  wheel    53732 Jan 10 17:14 pxeboot

from remote PC:
admin:~/Downloads$ tftp
tftp> connect gw
tftp> status
Connected to gw.
Mode: netascii Verbose: off Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> mode binary
tftp> status
Connected to gw.
Mode: octet Verbose: off Tracing: off
Rexmt-interval: 5 seconds, Max-timeout: 25 seconds
tftp> get 1.txt
^C
tftp>

on tftpd host:
# ping 192.168.5.1
PING 192.168.5.1 (192.168.5.1): 56 data bytes
64 bytes from 192.168.5.1: icmp_seq=0 ttl=64 time=0.524 ms
...
# tftpd -4dv -l 192.168.5.254 /usr/tftpboot
tftpd: 192.168.5.254: read request for '1.txt' # can get files locally
tftpd: 192.168.5.254: read request for 'pxeboot'     # can get files locally
tftpd: 192.168.5.1: read request for '1.txt' # can get files remotely
tftpd: send(block): No route to host
tftpd: 192.168.5.1: read request for '1.txt'
tftpd: send(block): No route to host
tftpd: 192.168.5.1: read request for '1.txt'
tftpd: send(block): No route to host
# tcpdump -i em0 -p udp 'port 69'
tcpdump: listening on em0, link-type EN10MB
17:21:38.462907 admin.40154 > gw.tftp: 14 RRQ "1.txt" (DF)
17:21:43.462961 admin.40154 > gw.tftp: 14 RRQ "1.txt" (DF)
17:21:48.463020 admin.40154 > gw.tftp: 14 RRQ "1.txt" (DF)
^C
8554 packets received by filter
0 packets dropped by kernel
# fstat | grep internet | grep tftpd
_tftpd   tftpd      18160    3* internet dgram udp 192.168.5.254:69

Reply via email to