Welcome to the forum everyone.
I ran into a problem that unfortunately I can't solve, even though I'm already trying everything.
I looked through the forums but couldn't find a solution.
A FreeBSD 13.2 system operating as a NAS, including printer and scanner sharing.
The network is heterogeneous. (Linux, iPhone, etc.).
The printer and scanner service runs in jail, with a VNET and bridge solution.
For iPhones and Macs, the Airprint service provides access using CUPS, DBUS and avahi, which works perfectly, but only if I start avahi manually.
If I start from /etc/rc.conf avahi starts, but does not advertise the machines on the network.
A
The settings are:
With the basic startup, the printer and scanner are not found for the network clients, but if I restart the avahi daemon manually, everything is fine.
You can solve it with your own script, but I would be interested in why it doesn't work by default.
Thank you very much if someone answers.
Best regards.
I ran into a problem that unfortunately I can't solve, even though I'm already trying everything.
I looked through the forums but couldn't find a solution.
A FreeBSD 13.2 system operating as a NAS, including printer and scanner sharing.
The network is heterogeneous. (Linux, iPhone, etc.).
The printer and scanner service runs in jail, with a VNET and bridge solution.
For iPhones and Macs, the Airprint service provides access using CUPS, DBUS and avahi, which works perfectly, but only if I start avahi manually.
If I start from /etc/rc.conf avahi starts, but does not advertise the machines on the network.
A
service avahi-daemon restart
command immediately solves the problem and the printer and scanner services work perfectly.The settings are:
Code:
### /etc/jail.conf
exec.clean;
exec.start = "/bin/sh /etc/rc";
exec.stop = "/bin/sh /etc/rc.shutdown";
allow.raw_sockets;
allow.mount;
allow.mount.tmpfs;
allow.mount.devfs;
allow.mount.nullfs;
allow.mount.fdescfs;
allow.mount.fusefs;
allow.mount.procfs;
allow.mount.zfs;
mount.devfs;
mount.fdescfs;
mount.procfs;
allow.reserved_ports;
allow.chflags;
devfs_ruleset = "100";
enforce_statfs = "0";
allow.sysvipc;
sysvmsg = "new";
sysvsem = "new";
sysvshm = "new";
vnet;
$domain = "fnas.home";
host.hostname = "${name}.${domain}";
samba {
path = "/jail/$name";
vnet.interface = "epair20b";
exec.prestart += "ifconfig epair20 create up";
exec.prestart += "ifconfig bridge0 addm epair20a";
exec.start += "ifconfig epair20b inet 172.16.0.20/16 up";
exec.start += "route add default 172.16.0.1";
exec.poststop = "ifconfig epair20b -vnet samba";
exec.poststop = "ifconfig bridge0 deletem epair20a";
exec.poststop += "sleep 2";
exec.poststop = "ifconfig epair20a destroy";
exec.consolelog = "/var/log/jail/jail_${name}.log";
mount.fstab += "/etc/jail.conf.d/fstab.${name}";
persist;
}
Code:
# usbconfig
ugen1.2: <HP Deskjet 1510 series> at usbus1, cfg=0 md=HOST spd=HIGH (480Mbps) pwr=ON (2mA)
Code:
# ps ax
PID TT STAT TIME COMMAND
1332 - IsJ 0:00,05 /usr/local/bin/dbus-daemon --system
1348 - SJ 0:00,17 avahi-daemon: running [samba.local] (avahi-daemon)
1351 - IsJ 0:00,07 /usr/local/sbin/cupsd -C /usr/local/etc/cups/cupsd.conf -s /usr/local/etc/cups/cups-files.conf
Code:
## /etc/rc.conf
dbus_enable="YES"
avahi_daemon_enable="YES"
cupsd_enable="YES"
saned_enable="YES"
With the basic startup, the printer and scanner are not found for the network clients, but if I restart the avahi daemon manually, everything is fine.
You can solve it with your own script, but I would be interested in why it doesn't work by default.
Thank you very much if someone answers.
Best regards.