Thanks for your reply.
I read the link content.
As I understood from the link somewhere (that I do not know) in the openvpn server side
the server automatically executes some commands like
push "route 192.168.10.0 255.255.255.0" that I am unaware of !
In my server side config I never push that route to the clients even in the clients CCD files.
I am not sure why that subnet (192.168.10.0/24) gets accessible automatically to the clients when clients are connected to the server!!!
Even I can not track how the packets get routed in the OpenVPN network ---> traceroute just shows the next hop the openvpn server 10.8.0.1.
In fact on the
OpenVPN server side I have two subnets.
Subnet (SRV-SUB-A) ---> 192.168.4.0/24 [OpenVPN server sits in this subnet and its IP address is 192.168.4.7]
Subnet (SRV-SUB-B) ---> 192.168.10.0/24 [This subnet is available to OpenVPN server over vlan2]
What I want is to revoke the access to (SRV-SUB-B) to the client_extra.
To clarify I want OpenVpn Server side does not promote or push SRV-SUB-B subnet on client_extra side.
So client_extra does not get access to that subnet at all.
And I do not care if client_extra can get access to SRV-SUB-A network or not.
But the server MUST promote or offer access to SRV-SUB-B subnet to client_sina since It has higher privileges.
I googled about it and I found an old link on
http://backreference.org/2010/06/18/openvpns-built-in-packet-filter/
and from that old link I understood packet filter needs compilation.
Since I would rather not to do cross-compilation [openvpn server runs on embedded device] I want to know if there exists an elegant way to solve this problem using OpenVPN options,iptables,ebtables,.... instead of dealing with cross compiling a code and ....
I am not sure if sending routing table of OpenVPN client/server side will give you more hints or not ?
If so what routing command will generate the most comprehensive output for that purpose ?
As additional question if on the openVPN server side I activate client-to-client option and client_sina and client_extra
access to each other subnets does client_sina expose SRV-SUB-B subnet (192.168.10.0/24) to client_extra ? If so how can I prevent it from client_sina side ?
Thanks again