Manual client to client connection
Posted: Wed Mar 26, 2014 11:06 pm
I have two clients with common names [client_sina] and [client_extra] that are connecting to an OpenVPN server on remote place via (TUN21) running on Tomato Router
The only physical port of the router (OpenVPN server) which is connected to the internet is via WAN port is and is connected to office subnet 192.168.10.x/24
clinet_sina gets static IP address from OVPN server on 10.8.0.69 and LAN 192.168.43.0/24
clinet_extra gets static IP address from OVPN server on 10.8.0.101 and LAN 192.168.42.0/24
and the server is in 192.168.4.0/24 network
I want client_sina get access to all the avaliable networks (client_extra 192.168.42.0/24,Office 192.168.10.0/24 and 192.168.43.0/24 (own network))
While the client_extra must be very limited and just access to 192.168.42.0/24 (own network) and client_sina (192.168.43.0/24) and maybe (openvpn server 192.168.4.0/24) BUT NOT OFFICE LAN which is 192.168.10.0/24.
The client_extra internet must come from the the office (IP forwarding).
Since I want to manage the clients access privileges to each other on the SERVER side I decided to disable
to take out client-to-client option on server side and make for every client a CCD on server side.
The CCD for client_sina is as follows:
ifconfig-push 10.8.0.69 10.8.0.70
# Automacitcally generated (client_sina ip address will be in 43 network
not 42)
iroute 192.168.43.0 255.255.255.0
# Make Serever side avaliable to client_sina
push "route 192.168.4.0 255.255.255.0"
push "route 192.168.10.0 255.255.255.0"
push "route 192.168.42.0 255.255.255.0"
The CCD for client_extra is as follows:
# Automacitcally generated (client_extra will reside in nwtwork 42)
iroute 192.168.42.0 255.255.255.0
ifconfig-push 10.8.0.101 10.8.0.102
# Forwarding internet traffic from workpalce
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"
push "route 192.168.43.0 255.255.255.0"
The server conf file is as follows:
daemon
server 10.8.0.0 255.255.255.0
proto udp
port 50443
dev tun21
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
verb 3
client-config-dir ccd
ccd-exclusive
route 192.168.42.0 255.255.255.0
route 192.168.43.0 255.255.255.0
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status
verb 5
mute 5
client-config-dir /jffs/ccd
max-clients 20
The implemented scenario client_sina can access to OfficeLAN,OpenVPN server but not client_extra.
How can I fix the problem!? I want client_sina get access to client_extra subnet network (I am using routing over TUN) and client_extra can not access to 192.168.10.x/24 office network ON SERVER side.

The only physical port of the router (OpenVPN server) which is connected to the internet is via WAN port is and is connected to office subnet 192.168.10.x/24
clinet_sina gets static IP address from OVPN server on 10.8.0.69 and LAN 192.168.43.0/24
clinet_extra gets static IP address from OVPN server on 10.8.0.101 and LAN 192.168.42.0/24
and the server is in 192.168.4.0/24 network
I want client_sina get access to all the avaliable networks (client_extra 192.168.42.0/24,Office 192.168.10.0/24 and 192.168.43.0/24 (own network))
While the client_extra must be very limited and just access to 192.168.42.0/24 (own network) and client_sina (192.168.43.0/24) and maybe (openvpn server 192.168.4.0/24) BUT NOT OFFICE LAN which is 192.168.10.0/24.
The client_extra internet must come from the the office (IP forwarding).
Since I want to manage the clients access privileges to each other on the SERVER side I decided to disable
to take out client-to-client option on server side and make for every client a CCD on server side.
The CCD for client_sina is as follows:
ifconfig-push 10.8.0.69 10.8.0.70
# Automacitcally generated (client_sina ip address will be in 43 network
not 42)
iroute 192.168.43.0 255.255.255.0
# Make Serever side avaliable to client_sina
push "route 192.168.4.0 255.255.255.0"
push "route 192.168.10.0 255.255.255.0"
push "route 192.168.42.0 255.255.255.0"
The CCD for client_extra is as follows:
# Automacitcally generated (client_extra will reside in nwtwork 42)
iroute 192.168.42.0 255.255.255.0
ifconfig-push 10.8.0.101 10.8.0.102
# Forwarding internet traffic from workpalce
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"
push "route 192.168.43.0 255.255.255.0"
The server conf file is as follows:
daemon
server 10.8.0.0 255.255.255.0
proto udp
port 50443
dev tun21
cipher AES-256-CBC
comp-lzo adaptive
keepalive 15 60
verb 3
client-config-dir ccd
ccd-exclusive
route 192.168.42.0 255.255.255.0
route 192.168.43.0 255.255.255.0
ca ca.crt
dh dh.pem
cert server.crt
key server.key
status-version 2
status status
verb 5
mute 5
client-config-dir /jffs/ccd
max-clients 20
The implemented scenario client_sina can access to OfficeLAN,OpenVPN server but not client_extra.
How can I fix the problem!? I want client_sina get access to client_extra subnet network (I am using routing over TUN) and client_extra can not access to 192.168.10.x/24 office network ON SERVER side.
