0

I'm trying to monitor all the traffic coming into my computer using software running in an LXC container. The software on the LXC expects to be monitoring eth1.

Thus, I would like to

  1. Create an eth1 interface on the LXC and
  2. forward all traffic coming into the host's eth0 to the container's eth1.

How should I go about doing this?

1 Answers1

0

I'm not familiar with LXC or how devices are shared between host and container, however using iptables you can forward traffic from one interface to another like so;

iptables -A FORWARD -i eth0 -o eth1 -j ACCEPT

Don't know if that helps you any.