accessing other pcs aside from openvpn server
Posted: Thu Jun 14, 2012 2:52 pm
Hi,
I follow the HOW-To to set up a openvpn server in a machine that has two NIC:
192.168.1.113 - connected to internet router 192.168.1.1
10.0.0.175 - connected to local area network 10.0.0.x
now I can connect the vpn and access 10.0.0.175, but I can't access other PC's like 10.0.0.171,
what I did wrong here?
openvpn server(10.0.0.175):
DEVICE=eth0
HWADDR=52:54:00:d3:20:e8
NM_CONTROLLED=yes
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
IPADDR=192.168.1.113
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=no
IPV6INIT=no
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
HWADDR=52:54:00:94:2d:8d
IPADDR=10.0.0.175
NETMASK=255.255.255.0
network setting in 10.0.0.171:
DEVICE=eth1
HWADDR=52:54:00:18:CD:A6
NM_CONTROLLED=yes
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
IPADDR=10.0.0.171
NETMASK=255.255.255.0
GATEWAY=10.0.0.175
and the openvpn server config:
server.conf:
port 1194
proto tcp
dev tun
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key # This file should be kept secret
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
;server-bridge
push "route 10.0.0.0 255.255.255.0"
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
;learn-address ./script
;push "redirect-gateway def1 bypass-dhcp"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
;client-to-client
;duplicate-cn
keepalive 10 120
;tls-auth ta.key 0 # This file is secret
;cipher BF-CBC # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES
comp-lzo
;max-clients 100
;user nobody
;group nobody
persist-key
persist-tun
status openvpn-status.log
;log openvpn.log
;log-append openvpn.log
verb 3
;mute 20
I follow the HOW-To to set up a openvpn server in a machine that has two NIC:
192.168.1.113 - connected to internet router 192.168.1.1
10.0.0.175 - connected to local area network 10.0.0.x
now I can connect the vpn and access 10.0.0.175, but I can't access other PC's like 10.0.0.171,
what I did wrong here?
openvpn server(10.0.0.175):
DEVICE=eth0
HWADDR=52:54:00:d3:20:e8
NM_CONTROLLED=yes
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
IPADDR=192.168.1.113
NETWORK=192.168.1.0
GATEWAY=192.168.1.1
NETMASK=255.255.255.0
USERCTL=no
PEERDNS=no
IPV6INIT=no
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
HWADDR=52:54:00:94:2d:8d
IPADDR=10.0.0.175
NETMASK=255.255.255.0
network setting in 10.0.0.171:
DEVICE=eth1
HWADDR=52:54:00:18:CD:A6
NM_CONTROLLED=yes
ONBOOT=yes
BOOTPROTO=none
TYPE=Ethernet
IPV6INIT=no
USERCTL=no
IPADDR=10.0.0.171
NETMASK=255.255.255.0
GATEWAY=10.0.0.175
and the openvpn server config:
server.conf:
port 1194
proto tcp
dev tun
ca /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/server.crt
key /etc/openvpn/easy-rsa/keys/server.key # This file should be kept secret
dh /etc/openvpn/easy-rsa/keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100
;server-bridge
push "route 10.0.0.0 255.255.255.0"
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
;learn-address ./script
;push "redirect-gateway def1 bypass-dhcp"
;push "dhcp-option DNS 208.67.222.222"
;push "dhcp-option DNS 208.67.220.220"
;client-to-client
;duplicate-cn
keepalive 10 120
;tls-auth ta.key 0 # This file is secret
;cipher BF-CBC # Blowfish (default)
;cipher AES-128-CBC # AES
;cipher DES-EDE3-CBC # Triple-DES
comp-lzo
;max-clients 100
;user nobody
;group nobody
persist-key
persist-tun
status openvpn-status.log
;log openvpn.log
;log-append openvpn.log
verb 3
;mute 20