Quantcast
Channel: Active questions tagged openvpn - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 823

OpenVPN Bridged Mode Virtualbox 3 VMs(Virtualbox) Setup ARP

$
0
0

I am currently experimenting with bridged mode in OpenVPN, only used the tun adapter so far. I have a setup with 3 VMs(Oracle Virtualbox) and internal Network in Virtualbox (Ubuntu 22.04 LTS).

VM01(VPN Bridge): 2 interfaces
enp0s3: 192.168.10.10/24 intnet1
enp0s8: 192.168.20.10/24 intnet2

VM02: 1 interface
enp0s3: 192.168.10.11/24 Virtualbox network intnet1

VM03: 1 interface
enp0s3: 192.168.20.11/24 Virtualbox network intnet2

Without VPN it works as expected,i can ping from VM01 to VM02, VM03. But with VM02 i cant ping to VM03.
The connection between VM02 and VM01 is the simulated internet connection and the goal is a VPN between the simulated internet connection to bridge into the network 192.168.10.0/24.

VM02(192.168.10.0/24) <--VPN--> VM01(VPN Bridge) <--Bridge--> Network192.168.20.0/24

I use the script from OpenVPN to create the bridge

#!/bin/bash################################## Set up Ethernet bridge on Linux# Requires: bridge-utils################################## Define Bridge Interfacebr="br0"# Define list of TAP interfaces to be bridged,# for example tap="tap0 tap1 tap2".tap="tap0"# Define physical ethernet interface to be bridged# with TAP interface(s) above.eth="enp0s8"eth_ip="192.168.20.10"eth_netmask="255.255.255.0"eth_broadcast="192.168.20.255"for t in $tap; do    openvpn --mktun --dev $tdonebrctl addbr $brbrctl addif $br $ethfor t in $tap; do    brctl addif $br $tdonefor t in $tap; do    ifconfig $t 0.0.0.0 promisc updoneifconfig $eth 0.0.0.0 promisc upifconfig $br $eth_ip netmask $eth_netmask broadcast $eth_broadcast

After establishing the VPN connection between VM02 and VM01 i want to ping from VM02 to VM03 with ping 192.168.20.11 it seems that the bridge connector receive the ARP request and also can find the right MAC Address, but it doesnt seem to do more than that.

enter image description here

Ping to the vpn host machine works fine(from VM02: ping 192.168.20.10). I also activated the promiscuos-mode at the network adapters.

enter image description here


Viewing all articles
Browse latest Browse all 823

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>