Outfile
на "/ dev / stdout"
. файл
, или оставить значение по умолчанию. printf '% s \ n' "$ outbuf"> "$ outfile"
Я использовал printf
из-за « Почему printf лучше, чем echo? ».
Предостережения к этому решению см. В ответ Стефана Шазеласа .
Исправлена проблема добавлением двух правил в iptables:
iptables -A FORWARD -m pkttype --pkt-type broadcast -i eth1 -j DROP
iptables -A INPUT -m pkttype --pkt-type broadcast -i eth1 -j DROP
Теперь Iptables выглядит:
$ iptables -L -v
Chain INPUT (policy ACCEPT 54446 packets, 5132K bytes)
pkts bytes target prot opt in out source destination
123 40344 DROP all -- eth1 any anywhere anywhere PKTTYPE = broadcast
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DROP all -- eth1 any anywhere anywhere PKTTYPE = broadcast
Chain OUTPUT (policy ACCEPT 8072 packets, 3990K bytes)
pkts bytes target prot opt in out source destination