Page 1 of 1

Simulating LAN 2 LAN with virtualbox not able to connect

Posted: Thu Dec 10, 2020 9:29 pm
by avezan
Greetings,

I have been trying to get this working for last 5 days still no success. I'll try to elaborate in as much detail as possible.


Basic Architecture:

- HeadQuarter (TOKYO) = no lan only server with single hub named "mainhub" on Windows 10.
[Simulated by SoftEther server running on Windows 10]

- Branch (OSAKA) = A router having a SoftEther bridge on openwrt and a single system with TinyCore OS connected in lan.
[Simulated by Virtualbox on Windows having two running VM's, one of openwrt, another TinyCore]

- Branch (TSUKUBA) = A router having a SoftEther bridge on openwrt and a single system with TinyCore OS connected in lan.
[Simulated by Virtualbox on Kubuntu having two running VM's, one of openwrt, another TinyCore]


Systems(2 Pc's One Win10, another Kubuntu 20.04):

1. Windows OS 10
- SofthEther
  • s-1. Has got SoftEther VPN Server (Main) with a HUB named "mainhub"
- Interfaces
  • i-1. Realtec Wireless Adapter with IP statically set as 192.168.1.5
2. Virtualbox on Windows 10 having following VMs

a) VM with Openwrt x86 OS
- SoftEther
  • s-1. Has got SoftEther VPN Bridge(edge) with HUB named "BRIDGE" cascading to "mainhub"
  • s-2. This VPN Bridge(edge) has a Local Bridge named "br2servWin" with interface "br-lan" i.e b2servWin = "BRIDGE" <--> "br-lan"

- Interfaces
  • i-1. eth0 which is bridged network with Windows "Wireless Adapter". IP statically set as 192.168.1.8
  • i-2. eth1 which is virtualbox adapter named "Virtual Box Adapter" having ip 192.168.56.1/24
  • i-3. eth2 which is "internal network" named "intnet" and in OPENWRT it is mapped by interface named "br-lan". IP for OpenWRT DHCP has been fixed at 10.1.15.1/24


b) VM with TinyCore OS
- Nothing from softether
- Interfaces
  • i-1. eth0 which is internal network "intnet" which get IP from br-lan's DHCP sometimes 10.1.15.180
3. Virtualbox on Kubuntu 20.04 having following VMs

a) VM with Openwrt x86 OS
- SoftEther
  • s-1. Has got SoftEther VPN Bridge(edge) with HUB named "BRIDGE" cascading to "mainhub"
  • s-2. This VPN Bridge(edge) has a Local Bridge named "br2serv" with interface "br-lan" i.e b2serv = "BRIDGE" <--> "br-lan"

- Interfaces
  • i-1. eth0 which is bridged network with Kubuntu's "Wireless Adapter(wlan0)". IP statically set as 192.168.1.7
  • i-2. eth1 which is virtualbox adapter named "vboxnet0" having ip 192.168.56.1/24
  • i-3. eth2 which is "internal network" named "intnet" and in OPENWRT it is again mapped by interface named "br-lan". IP for OpenWRT DHCP has been fixed at 10.1.16.1/24


b) VM with TinyCore OS
- Nothing from softether
- Interfaces
  • i-1. eth0 which is internal network "intnet" which gets IP from br-lan's DHCP sometimes 10.1.16.180
4. A wireless router with address 192.168.1.1/24 and simulates internet by connecting directly to
  • - 192.168.1.5(Win10)
  • - 192.168.1.7(Kubuntu/VM/OpenWrt)
  • - 192.168.1.8(Win10/VM/OpenWrt)


Working:
1. All Edges i.e. 192.168.1.8(Win10/VM/OpenWrt) and 192.168.1.7(Kubuntu/VM/OpenWrt) are cascading to main server 192.168.2.5(Win10).
2. Each edge has its local bridge as operational.
3. I can ping among 192.168.1.5(Win10), 192.168.1.7(Kubuntu/VM/OpenWrt), 192.168.1.8(Win10/VM/OpenWrt)

Not Working:
1. However I can't ping 10.1.16.180(Kubuntu/VM/TinyCore) from 10.1.15.180(Win10/VM/TinyCore) or vice versa.

Further in real requirements both VM's Openwrt LAN (i.e OSAKA and TSUKUBA) may have same IP range say 10.1.0.0/24.

Can anyone help me figuring what am I missing or I am not understanding the VPN at all. :(

Re: Simulating LAN 2 LAN with virtualbox not able to connect

Posted: Fri Dec 11, 2020 7:07 am
by Afakename
Bridging requires the bridge interface to be set/enable 1) promiscuous mode 2) MAC spoofing. In VM environments, these 2 options usually come disabled. Can you kindly confirm these 2 options are enabled? The bridge status within SEVPN may be misleading and display as operational, but until the bridging requirements are met, the bridge is not going to work.

Re: Simulating LAN 2 LAN with virtualbox not able to connect

Posted: Fri Dec 11, 2020 12:02 pm
by avezan
Thanks for the reply.
I somehow succeded making it work yesterday. Promiscous mode was enabled so was mac spoofing(not very sure but sessions had different mac).

However adding two more hubs on server, and a tap device on each router, followed by setting L3 routing in server, I was able to ping across both tinycores. But now have got other problems like
  • Ping packet drop rate is high.
  • Can't make it work without enabling SecureNAT on both server hubs
For the first one I'll try rawpacket disabling. But for the second one I have no idea how to communicate with the corresponding server hub without securenat as hub wont have any ip address where tap can forward its packet.