[BitVisor-devel-en:112] Re: Bitvisor Wireguard problems?

Hideki EIRAKU hdk at igel.co.jp
Wed Jun 12 10:48:46 JST 2024


>         .ip = {
>                 .use_dhcp = 0, >>>>>>>>>>> The local VM system is
> bridged with the host and gets a 192.168.1.xxx IP address
>                 .ipaddr = { 0, 0, 0, 0 },
>                 .netmask = { 0, 0, 0, 0 },
>                 .gateway = { 0, 0, 0, 0 },
>         },
>         .wg = {
>                 .ipaddr = { 10, 5, 0, 100 },
>                 .netmask = { 255, 255, 255, 0 },
>                 .gateway = { 0, 0, 0, 0
> },                                 >>>>> Not sure as to what Gateway
> that I should have here. ?????

I think wireguard gateway 0.0.0.0 is okay, but the .ip fields are
incorrect.  These addresses are used by lwIP (TCP/IP stack) in the
hypervisor.  For example, in case of running BitVisor on QEMU
environment with user networking, .ip.use_dhcp=1 will get IP address
10.0.2.15 assigned.  Or you can assign the address manually like:

.ip = { .use_dhcp = 0,
.ipaddr = {10,0,2,15}, .netmask = {255,255,255,0}, .gateway={10,0,2,2}, },

UDP packets of WireGuard will be sent from this IP address to
wg.ipaddr_end_point.  If the .ipaddr is set to 0.0.0.0, I think no
WireGuard packets can be sent.

-- 
Hideki EIRAKU <hdk at igel.co.jp>

From: Lonnie Cumberland <lonnie at outstep.com>
Subject: Bitvisor Wireguard problems?
Date: Tue, 11 Jun 2024 18:03:07 -0400

> Hello All,
> 
> I have been struggling with trying to get bitvisor to work with
> wireguard and have been following the "bitvisor/docs" for the ReadMe
> of "wireguard_guest_os.md"
> 
> Also, I have a wireguard server set up on a VPS system and can connect
> to the wireguard server via native Windows 10 (x64) and also have set
> up Ubuntu 24.04 (x64) in a VMware Workstation 17 Pro for which I can
> also connect to the wireguard server when both of these are not
> running bitvisor.
> 
> When I am running bitvisor with the "net=ippass" then I can access the
> Internet with no problems as well, but the moment I set up bitvisor to
> use wireguard (also selecting it in the "make config") and setting
> "net=ipwggos" then it seems that I cannot connect to the wireguard
> server on the VPS system.
> 
> My Configuration "Defconfig" for this sections is:
> 
> --------------------------------------------
>                 .tty_pro1000 = 0,
>                 .tty_rtl8169 = 0,
>                 .tty_x540 = 0,
>                 .tty_ieee1394 = 0,
>                 .driver = {
>                         .pci =
> "driver=pro1000,net=ipwggos,tty=1,virtio=1",
>                 },
>                 .iccard = {
>                         .enable = 0,
>                         .status = 0,
>                 },
>         },
>         .ip = {
>                 .use_dhcp = 0, >>>>>>>>>>> The local VM system is
> bridged with the host and gets a 192.168.1.xxx IP address
>                 .ipaddr = { 0, 0, 0, 0 },
>                 .netmask = { 0, 0, 0, 0 },
>                 .gateway = { 0, 0, 0, 0 },
>         },
>         .wg = {
>                 .ipaddr = { 10, 5, 0, 100 },
>                 .netmask = { 255, 255, 255, 0 },
>                 .gateway = { 0, 0, 0, 0
> },                                 >>>>> Not sure as to what Gateway
> that I should have here. ?????
>                 .ipaddr_end_point = { 154, 53, 48, 214 },
>                 .peer_allowed_ip = { 0, 0, 0, 0 },
>                 .peer_allowed_mask = { 0, 0, 0, 0 },
>                 .peer_endpoint_port = 51820,
>                 .wg_listen_port = 51444,
>                 .wg_private_key = "(REDACTED HERE)",  /* I have the
> actual private key when needed */
>                 .peer_public_key =
> "WhaBE3ruQgEgBvwK6+MWqmUjfeEwXHcS/2fQrEAlZRg=",   /* Public key of the
> Wireguard Server */
>         },
>         .wg_gos = {
>                 .ipaddr = { 10, 5, 0, 99 },
>                 .dns = { 8, 8, 8, 8 },
>                 .mac_gateway = { 0x02, 0x48, 0x84, 0x76, 0x71, 0x00 },
>         },
>         .tls = {
>                 .srv_cert = "",
>                 .srv_key = "",
>                 .ca_cert = "",
> 
> --------------------------------------------
> 
> Any help would be greatly appreciated.
> 
> Thanks and have a great day
> Lonnie


More information about the BitVisor-devel-en mailing list