In the server-bridge mode device type TAP impossible to show clients IP address
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 14.6k
- Forks
- 3.4k
- PR merge metrics
- No merged PRs in 30d
Description
On the VyOS 1.4.1/1.5/rolling based on Debian 12, we use server-bridge mode and device type tap
And cannot see the client IP address from the server site.
related ref https://vyos.dev/T7207
Topology:
Example of configuration on the server site:
set interfaces bridge br214 address '10.0.10.1/24'
set interfaces bridge br214 member interface eth0
set interfaces bridge br214 member interface vtun214
set interfaces openvpn vtun214 device-type 'tap'
set interfaces openvpn vtun214 encryption cipher 'aes128'
set interfaces openvpn vtun214 hash 'sha256'
set interfaces openvpn vtun214 local-host '203.0.113.2'
set interfaces openvpn vtun214 local-port '1194'
set interfaces openvpn vtun214 mode 'server'
set interfaces openvpn vtun214 server bridge gateway '10.0.10.1'
set interfaces openvpn vtun214 server bridge start '10.0.10.100'
set interfaces openvpn vtun214 server bridge stop '10.0.10.200'
set interfaces openvpn vtun214 server bridge subnet-mask '255.255.255.0'
set interfaces openvpn vtun214 server topology 'subnet'
set interfaces openvpn vtun214 tls ca-certificate 'ca'
set interfaces openvpn vtun214 tls certificate 'cert-vtun214'
set interfaces openvpn vtun214 tls dh-params 'dh'
Generated OpenVPN server configuration:
vyos@v-server:~$ sudo cat /run/openvpn/vtun214.conf
### Autogenerated by interfaces_openvpn.py ###
#
# See https://community.openvpn.net/openvpn/wiki/Openvpn24ManPage
# for individual keyword definition
#
#
#
verb 3
dev-type tap
dev vtun214
persist-key
proto udp
local 203.0.113.2
lport 1194
disable-dco
#
# OpenVPN Server mode
#
mode server
tls-server
server-bridge 10.0.10.1 255.255.255.0 10.0.10.100 10.0.10.200
keepalive 10 600
management /run/openvpn/openvpn-mgmt-intf unix
# TLS options
ca /run/openvpn/vtun214_ca.pem
cert /run/openvpn/vtun214_cert.pem
key /run/openvpn/vtun214_cert.key
dh /run/openvpn/vtun214_dh.pem
# Encryption options
cipher AES-128-CBC
# https://vyos.dev/T5027
# Required to support BF-CBC (default ciphername when none given)
providers legacy default
auth sha256
With this configuration, all work fine, but we cannot see the IP address assigned to the client-1, we can only see the MAC/HW address
vyos@v-server:~$ sudo cat /run/openvpn/vtun214.status
OpenVPN CLIENT LIST
Updated,2025-03-26 17:08:52
Common Name,Real Address,Bytes Received,Bytes Sent,Connected Since
client-01.vyos.io,192.0.2.2:56550,8651,52953,2025-03-26 16:50:23
ROUTING TABLE
Virtual Address,Common Name,Real Address,Last Ref
0c:64:80:6f:00:00@0,client-01.vyos.io,192.0.2.2:56550,2025-03-26 16:50:24
3e:0a:13:34:78:2e@0,client-01.vyos.io,192.0.2.2:56550,2025-03-26 16:50:23
GLOBAL STATS
Max bcast/mcast queue length,1
END
vyos@v-server:~$
In the parsed output, it looks like (option Tunnel IP)
vyos@v-server:~$ show openvpn server
OpenVPN status on vtun214
Client CN Remote Host Tunnel IP Local Host TX bytes RX bytes Connected Since
----------------- --------------- ------------------- ---------------- ---------- ---------- -------------------
client-01.vyos.io 192.0.2.2:56550 0c:64:80:6f:00:00@0 203.0.113.2:1194 58.2 KB 9.0 KB 2025-03-26 16:50:23
vyos@v-server:~$
This way, we see only 0c:64:80:6f:00:00@0 (MAC/HW)
But the client got not only MAC/HW but also an IP address from the OpenVPN server
vyos@v-client:~$ ip a show dev vtun214
8: vtun214: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master br214 state UP group default qlen 1000
link/ether 3e:0a:13:34:78:2e brd ff:ff:ff:ff:ff:ff
inet 10.0.10.100/24 scope global vtun214
valid_lft forever preferred_lft forever
vyos@v-client:~$
Is it a bug or feature? Is it possible to see the IP address of the client from the server site in the status file?
Version:
vyos@v-server:~$ show version all | match openvpn
ii openvpn 2.6.3-1+deb12u2 amd64 virtual private network daemon
ii openvpn-auth-ldap 2.0.4-3 amd64 OpenVPN LDAP authentication module
ii openvpn-auth-radius 2.1-8 amd64 OpenVPN RADIUS authentication module
ii openvpn-dco 0.2.20231117 amd64 OpenVPN Data Channel Offload
ii openvpn-otp 1.0-6-g9781ff1 amd64 OpenVPN OTP Authentication support.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the server-bridge TAP setup using the provided VyOS configuration, then inspect the generated /run/openvpn/vtun214.status and the show openvpn server output. Compare the routing-table entries with the client's assigned 10.0.10.100 address; done means the server-side status data reports the client IP instead of only the MAC address, if OpenVPN exposes it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100