Hello, the following is my virtualbox freebsd host:
FreeBSD 13.0-RELEASE-p7
virtualbox-ose-6.1.30
I want manipulate the outgoing traffic from the VM (the guest is linux but I have the same problem with an other vm that is openbsd).
Now the VM has a NIC in BRIDGED mode that works. But in this way I can't manipultate any packet from the vm. I don't know if it's normal or not, but it seems to me that I can't do anything of the traffic from the virtual nic that is in bridged mode. Anyway I'd like change the routing table of part of the traffic outgoing of the vm. I have already created a new routing path that works from the freebsd host, but doesn't from the virtual machine linux. Just the traffic pass through directly to the real nic. If I change the virtual nic from bridged to nat the vm networking simply does not work. It's like the vm would be isolated.
I try to make a little schema because my english is not so good:
VM (192.168.0.6) ----> freebsd host (192.168.0.5) ----> ssh tunnel (just for some part of traffic) 10.1.1.1 ----> remote sshd (gateway) 10.1.1.2
I want change the routing path for a specific ip to tunnel it in a ssh tunnel that I created with tun. As I already said the new routing path to the tunnel works from the freebsd host but does not work from the vm.
Then I have two solution:
1) or I find a way to manipulate the traffic from the bridge nic
2) or I find a way to make working the nic in NAT mode.
Thanks for any help.
FreeBSD 13.0-RELEASE-p7
virtualbox-ose-6.1.30
Bash:
# grep -i box /etc/rc.conf /boot/loader.conf
/etc/rc.conf:kld_list="nvidia-modeset pf ext2fs vboxdrv vboxnetadp fusefs"
/etc/rc.conf:vboxnet_enable="YES"
/boot/loader.conf:vboxdrv_load="YES"
uid=1001(myuser) gid=1001(myuser) groups=1001(lws),0(wheel),5(operator),44(video),920(vboxusers),1001(myuser)
I want manipulate the outgoing traffic from the VM (the guest is linux but I have the same problem with an other vm that is openbsd).
Now the VM has a NIC in BRIDGED mode that works. But in this way I can't manipultate any packet from the vm. I don't know if it's normal or not, but it seems to me that I can't do anything of the traffic from the virtual nic that is in bridged mode. Anyway I'd like change the routing table of part of the traffic outgoing of the vm. I have already created a new routing path that works from the freebsd host, but doesn't from the virtual machine linux. Just the traffic pass through directly to the real nic. If I change the virtual nic from bridged to nat the vm networking simply does not work. It's like the vm would be isolated.
I try to make a little schema because my english is not so good:
VM (192.168.0.6) ----> freebsd host (192.168.0.5) ----> ssh tunnel (just for some part of traffic) 10.1.1.1 ----> remote sshd (gateway) 10.1.1.2
I want change the routing path for a specific ip to tunnel it in a ssh tunnel that I created with tun. As I already said the new routing path to the tunnel works from the freebsd host but does not work from the vm.
Then I have two solution:
1) or I find a way to manipulate the traffic from the bridge nic
2) or I find a way to make working the nic in NAT mode.
Thanks for any help.