IPTABLES problem in LXC container
by mackowiakp from LinuxQuestions.org on (#4Z97Z)
I have set of iptables rules running on Raspian RPI (Ubuntu 14.4). For example entry like this:
Code:/sbin/iptables -A INPUT -p tcp --dport 8080 -i eth0 -m mac --mac-source 84:f3:eb:b7:45:42 -j ACCEPTIt works good on RPi. But now I want to use it in Ubuntu 16.04.6 LTS Xenial, installed in LXC container on QNAP NAS.
Container and NAS have addresses from the same subnet.
But when I try to run the command above on Ubuntu in container I get such error:
Code:root@Xenial:/home/ubuntu/Pobrane# /sbin/iptables -A INPUT -p tcp --dport 8080 -i eth0 -m mac --mac-source 84:f3:eb:b7:45:42 -j ACCEPT
iptables: No chain/target/match by that name.I try many syntax's and it is possible to enter such command without error but only without MAC address specification.
What mistake I am doing? Any help?


Code:/sbin/iptables -A INPUT -p tcp --dport 8080 -i eth0 -m mac --mac-source 84:f3:eb:b7:45:42 -j ACCEPTIt works good on RPi. But now I want to use it in Ubuntu 16.04.6 LTS Xenial, installed in LXC container on QNAP NAS.
Container and NAS have addresses from the same subnet.
But when I try to run the command above on Ubuntu in container I get such error:
Code:root@Xenial:/home/ubuntu/Pobrane# /sbin/iptables -A INPUT -p tcp --dport 8080 -i eth0 -m mac --mac-source 84:f3:eb:b7:45:42 -j ACCEPT
iptables: No chain/target/match by that name.I try many syntax's and it is possible to enter such command without error but only without MAC address specification.
What mistake I am doing? Any help?