Virtual Network Adapter - Work

1. What is a Virtual Network Adapter? A virtual network adapter is a software-based emulation of a physical network interface card (NIC). It behaves like a real network card, with its own MAC address, IP configuration, and network traffic, but it exists entirely in software.

Use Tunnelblick (OpenVPN GUI) which creates utun interfaces automatically. Linux Method 1: Virtual Ethernet (veth) pairs # Create a pair of connected virtual adapters sudo ip link add veth0 type veth peer name veth1 Assign IP addresses sudo ip addr add 10.0.0.1/24 dev veth0 sudo ip addr add 10.0.0.2/24 dev veth1 Bring them up sudo ip link set veth0 up sudo ip link set veth1 up Method 2: TUN/TAP adapter (userspace) # Create TAP (Layer 2) adapter sudo ip tuntap add dev tap0 mode tap Create TUN (Layer 3) adapter sudo ip tuntap add dev tun0 mode tun Bring up sudo ip link set tap0 up sudo ip addr add 192.168.99.1/24 dev tap0 Method 3: Bridge adapter sudo ip link add br0 type bridge sudo ip link set eth0 master br0 sudo ip link set br0 up 4. Configuring Virtual Adapters Assign an IP address (Windows PowerShell) # Get adapter index Get-NetAdapter | Where-Object $_.InterfaceDescription -like "*Loopback*" Set static IP (example: adapter index 15) New-NetIPAddress -InterfaceIndex 15 -IPAddress 192.168.100.10 -PrefixLength 24 -DefaultGateway 192.168.100.1 Assign IP (macOS) sudo ifconfig bridge0 inet 192.168.100.10 netmask 255.255.255.0 up Assign IP (Linux) sudo ip addr add 192.168.100.10/24 dev veth0 5. Common Use Cases & Examples Virtual Machine Networking [VM Guest] ←→ [Virtual Adapter] ←→ [Virtual Switch] ←→ [Physical NIC] ←→ Network Hyper-V example: virtual network adapter