Is it possible to distinguish traffic from guest box with NAT interface (exact setting "Attached to: NAT")?
I need to apply iptables rules on the traffic from virtualbox guest, so netfilter's mark would be great if it's possible to set.
Distinguish traffic from NAT interface.
-
- Site Moderator
- Posts: 5229
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Distinguish traffic from NAT interface.
AFAIK that's not possible. iptables doesn't have a good mechanism to distinguish an application other than the PID or the user/group owner (regardless of application).
My advise would be to use Host-Only with NATing in the host and filter on that.
My advise would be to use Host-Only with NATing in the host and filter on that.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!
Re: Distinguish traffic from NAT interface.
Can't do that unfortunately. Which of the virtualbox processes initiate the traffic? Maybe force it to run under different GID?noteirak wrote: My advise would be to use Host-Only with NATing in the host and filter on that.
-
- Site Moderator
- Posts: 5229
- Joined: 13. Jan 2012, 11:14
- Primary OS: Debian other
- VBox Version: OSE Debian
- Guest OSses: Debian, Win 2k8, Win 7
- Contact:
Re: Distinguish traffic from NAT interface.
If you run the VM with the GUI, it will be the VirtualBox process.
If you run without the GUI (in the background), it will be the VBoxHeadless process.
If you run without the GUI (in the background), it will be the VBoxHeadless process.
Hyperbox - Virtual Infrastructure Manager - https://apps.kamax.lu/hyperbox/
Manage your VirtualBox infrastructure the free way!
Manage your VirtualBox infrastructure the free way!