[vbox-dev] Custom Bridge Interface
Ritesh Raj Sarraf
rrs at researchut.com
Tue Jan 13 13:31:07 UTC 2015
On 01/13/2015 06:39 PM, Alexey Eromenko wrote:
>
> Yeah.
>
> To attach to custom bridge create a loopback interface on your host
> OS, then join custom bridge with loopback, then bridge VBOX VM with
> loopback.
>
Hello Alexey,
What exact loopback device you are referring to here ?
Like I mentioned in the initial post, I am able to bind the VMs network
to the host's bridge, which isn't bound to any particular host
interface. See config below:
# This bridge will is used to NAT LXC containers' traffic
auto lxcbr0
iface lxcbr0 inet static
bridge_fd 0
bridge_maxwait 0
address 172.16.10.1
netmask 255.255.0.0
pre-up brctl addbr lxcbr0
post-down brctl delbr lxcbr0
post-down echo 0 > /proc/sys/net/ipv4/ip_forward
post-down echo 0 > /proc/sys/net/ipv6/conf/all/forwarding
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up echo 1 > /proc/sys/net/ipv6/conf/all/forwarding
post-up iptables -A FORWARD -i lxcbr0 -s 172.16.10.1/16 -j ACCEPT
post-up iptables -A POSTROUTING -t nat -s 172.16.10.1/16 -j MASQUERADE
# add checksum so that dhclient does not complain.
# udp packets staying on the same host never have a checksum filled else
post-up iptables -A POSTROUTING -t mangle -p udp --dport bootpc -s
172.16.10.1/16 -j CHECKSUM --checksum-fill
pre-down iptables -D FORWARD -i lxcbr0 -s 172.16.10.1/16 -j ACCEPT
pre-down iptables -D POSTROUTING -t nat -s 172.16.10.1/16 -j MASQUERADE
# add checksum so that dhclient does not complain.
# udp packets staying on the same host never have a checksum filled else
pre-down iptables -D POSTROUTING -t mangle -p udp --dport bootpc -s
172.16.10.1/16 -j CHECKSUM --checksum-fill
Can anyone shed some light on what the crash maybe ? I encountered the
crash when trying to ssh into one of the VMs, which is when it lost
network. Surprisingly, prior to the ssh, all ping requests worked fine.
--
Ritesh Raj Sarraf
RESEARCHUT - http://www.researchut.com
"Necessity is the mother of invention."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.virtualbox.org/pipermail/vbox-dev/attachments/20150113/6db7f002/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20150113/6db7f002/attachment.bin
More information about the vbox-dev
mailing list