Sample Header Ad - 728x90

centos/linux: run tftpd in a non-default net namespace

0 votes
1 answer
249 views
I wonder if anyone succeeded starting a tftpd in a network namespace (I'm using tftp-server-5.2-22.el7.x86_64.rpm)? I.e., starting tftpd in a default NS is trivial:
bash# systemctl start tftp
bash# systemctl status tftp
* tftp.service - Tftp Server
   Loaded: loaded (/usr/lib/systemd/system/tftp.service; indirect; vendor preset: disabled)
   Active: active (running) since Mon 2023-08-28 05:32:00 PDT; 3s ago
...
However, if I try to modify its service-unit file, namely this line:
[Service]
ExecStart=/usr/sbin/in.tftpd -s /var/lib/tftpboot
prepending command with either ip netns exec ns-red ... or with nsenter --net=/run/netns/ns-red ..., it never works, the system logs throws these errors:
systemd: tftp.service: Got no socket.
systemd: tftp.service: Failed to run 'start' task: Invalid argument
systemd: tftp.service: Failed with result 'resources'.
systemd: Failed to start Tftp Server.
Any help is greatly appreciated!
Asked by Dmitry (83 rep)
Aug 28, 2023, 12:40 PM
Last activity: Aug 28, 2023, 04:37 PM