Peer to Peer communication between clients
Posted: Mon Oct 10, 2011 4:43 pm
Hello guys, this is my first post.
I am currently using a freebsd router/firewall/openvpn server/client called pfsense to establish a VPN between a server and two clients. pfsense only supports peer to peer client communications, so I am setup using peer to peer where device 1 is a server out on the internet, and device 2 and 3 are clients elsewhere. They are successfully connected and can communicate with the server. My goal is to find a way to route traffic from device 2 to device 3 and vice versa. I am hoping someone has a little experience in a similar situation and can help. I will gladly provide any additional information, go easy on me if i forgot anything important =[
I am testing this all on a LAN right now.
Server:
WAN: 192.168.1.147
LAN: 192.168.10.1/24
Client1:
WAN: 192.168.1.141
LAN: 192.168.20.1/24
Client2:
WAN 192.168.1.144
LAN: 192.168.30.1/24
Devices in the LAN of Client1 and Client2 can ping devices in the Server LAN, however the server cannot ping back. I dont need it to. I need devices in the LAN of Client1 to be able to talk to the devices in the LAN of Client2. The Server is configured for Peer-to-Peer w/ Shared Key. It looks like I need something along the lines of a push and route and iroute but I am not very technical so if someone could explain how to use these accordingly it would be a great help
Thanks guys
digiwolff
Configs:
Server:
dev ovpns1
dev-type tun
dev-node /dev/tun1
writepid /var/run/openvpn_server1.pid
#user nobody
#group nobody
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp
cipher AES-128-CBC
up /usr/local/sbin/ovpn-linkup
down /usr/local/sbin/ovpn-linkdown
local 192.168.1.147
ifconfig 192.168.102.1 192.168.102.2
lport 1194
management /var/etc/openvpn/server1.sock unix
max-clients 1
push "route 192.168.30.1 255.255.255.0"
route 192.168.20.1 255.255.255.0
secret /var/etc/openvpn/server1.secret
comp-lzo
log /var/log/opvn1.log
log-append /var/log/opvn1.log
verb 7
Client 1:
dev ovpnc1
dev-type tun
dev-node /dev/tun1
writepid /var/run/openvpn_client1.pid
#user nobody
#group nobody
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp
cipher AES-128-CBC
up /usr/local/sbin/ovpn-linkup
down /usr/local/sbin/ovpn-linkdown
local 192.168.1.141
lport 0
management /var/etc/openvpn/client1.sock unix
remote 192.168.1.147 1194
ifconfig 192.168.102.2 192.168.102.1
route 192.168.10.1 255.255.255.0
secret /var/etc/openvpn/client1.secret
comp-lzo
Client 2 is almost identical
I am currently using a freebsd router/firewall/openvpn server/client called pfsense to establish a VPN between a server and two clients. pfsense only supports peer to peer client communications, so I am setup using peer to peer where device 1 is a server out on the internet, and device 2 and 3 are clients elsewhere. They are successfully connected and can communicate with the server. My goal is to find a way to route traffic from device 2 to device 3 and vice versa. I am hoping someone has a little experience in a similar situation and can help. I will gladly provide any additional information, go easy on me if i forgot anything important =[
I am testing this all on a LAN right now.
Server:
WAN: 192.168.1.147
LAN: 192.168.10.1/24
Client1:
WAN: 192.168.1.141
LAN: 192.168.20.1/24
Client2:
WAN 192.168.1.144
LAN: 192.168.30.1/24
Devices in the LAN of Client1 and Client2 can ping devices in the Server LAN, however the server cannot ping back. I dont need it to. I need devices in the LAN of Client1 to be able to talk to the devices in the LAN of Client2. The Server is configured for Peer-to-Peer w/ Shared Key. It looks like I need something along the lines of a push and route and iroute but I am not very technical so if someone could explain how to use these accordingly it would be a great help
Thanks guys
digiwolff
Configs:
Server:
dev ovpns1
dev-type tun
dev-node /dev/tun1
writepid /var/run/openvpn_server1.pid
#user nobody
#group nobody
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp
cipher AES-128-CBC
up /usr/local/sbin/ovpn-linkup
down /usr/local/sbin/ovpn-linkdown
local 192.168.1.147
ifconfig 192.168.102.1 192.168.102.2
lport 1194
management /var/etc/openvpn/server1.sock unix
max-clients 1
push "route 192.168.30.1 255.255.255.0"
route 192.168.20.1 255.255.255.0
secret /var/etc/openvpn/server1.secret
comp-lzo
log /var/log/opvn1.log
log-append /var/log/opvn1.log
verb 7
Client 1:
dev ovpnc1
dev-type tun
dev-node /dev/tun1
writepid /var/run/openvpn_client1.pid
#user nobody
#group nobody
script-security 3
daemon
keepalive 10 60
ping-timer-rem
persist-tun
persist-key
proto udp
cipher AES-128-CBC
up /usr/local/sbin/ovpn-linkup
down /usr/local/sbin/ovpn-linkdown
local 192.168.1.141
lport 0
management /var/etc/openvpn/client1.sock unix
remote 192.168.1.147 1194
ifconfig 192.168.102.2 192.168.102.1
route 192.168.10.1 255.255.255.0
secret /var/etc/openvpn/client1.secret
comp-lzo
Client 2 is almost identical