Hello everyone!
I built an openvpn server like above configurations of server.conf.
daemon
server 172.16.0.0 255.255.255.128
proto tcp
port 1194
dev tun
comp-lzo
keepalive 15 60
verb 3
persist-key
persist-tun
push "dhcp-option DNS 8.8.8.8"
client-config-dir ccd
route 194.97.114.3 255.255.255.255
client-to-client
cipher AES-256-CBC
ca /etc/openvpn/keys/ca.crt
dh /etc/openvpn/keys/dh1024.pem
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
log-append /var/log/openvpn.log
status-version 2
status /var/log/openvpn.stats 5
I want to access the ip adddress
194.97.114.3 through my client (I just have one client connected). For this, I've created above rule inside a file named with his common-name.
/etc/openvpn/ccd/
pedrorouter-clientkey
iroute 194.97.114.3 255.255.255.255
When I cat file "/var/log/openvpn.stats" I cannot see this route added to oVPN routing table.
# cat /var/log/openvpn.stats
TITLE,OpenVPN 2.2.1 x86_64-linux-gnu [SSL] [LZO2] [EPOLL] [PKCS11] [eurephia] [M H] [PF_INET6] [IPv6 payload 20110424-2 (2.2RC2)] built on Mar 23 2012
TIME,Tue Sep 25 13:25:59 2012,1348593959
HEADER,CLIENT_LIST,Common Name,Real Address,Virtual Address,Bytes Received,Bytes Sent,Connected Since,Connected Since (time_t)
CLIENT_LIST,pedrorouter-clientkey,187.67.xxx.xxx:62149,172.16.0.6,4971,6772,Tue Se p 25 13:22:16 2012,1348593736
HEADER,ROUTING_TABLE,Virtual Address,Common Name,Real Address,Last Ref,Last Ref (time_t)
ROUTING_TABLE,172.16.0.6,pedrorouter-clientkey,187.67.xxx.xxx:62149,Tue Sep 25 13: 22:29 2012,1348593749
GLOBAL_STATS,Max bcast/mcast queue length,0
END
Server kernel's routing table:
# ip route
default via 178.xxx.xxx.xxx dev eth0
172.16.0.0/25 via 172.16.0.2 dev tun0
172.16.0.2 dev tun0 proto kernel scope link src 172.16.0.1
178.xxx.xxx.0/24 dev eth0 proto kernel scope link src 178.xxx.xxx.xxx
194.97.114.3 via 172.16.0.2 dev tun0
- Server IP address: 172.16.0.1;
- Client IP addess: 172.16.0.6;
- I can reach each other normally;
- I cannot reach 194.97.114.3 of 172.16.0.1 (ovpn_server);
- I can reach normally 194.97.114.3 of 172.16.0.6 (pedrorouter-keyclient);
- 172.16.0.6 (pedrorouter-keyclient) is a router working on unix platform, so I don't need to enable ip forwarding anymore. It's default enabled;
- At the server (172.16.0.1) when I do a traceroute for 194.97.114.3:
# traceroute 194.97.114.3
traceroute to 194.97.114.3 (194.97.114.3), 30 hops max, 60 byte packets
1 * * *
2 * * *
3 * * *
4 * * *
5 * * *
6 *^C
What else I need to do to?
Can anybody help me, plz?