|
From: Sonnie H. <son...@gm...> - 2008-01-01 01:32:06
|
server.conf:
port 1194
proto udp
dev tap0
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
ifconfig-pool-persist ipp.txt
server-bridge 202.38.74.27 255.255.255.0 202.38.74.51 202.38.74.52
push "dhcp-option DNS 202.38.64.1"
client-to-client
duplicate-cn
keepalive 10 120
comp-lzo
user nobody
group nogroup
persist-key
persist-tun
status /var/log/openvpn/status.log
log-append /var/log/openvpn/access.log
verb 3
plugin /usr/lib/openvpn/openvpn-auth-pam.so login
client-cert-not-required
username-as-common-name
server is on ubuntu, so I start openvpn by:
sudo /etc/init.d/openvpn start
client.conf:
client
dev tap
proto udp
remote 202.38.74.27 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
comp-lzo
verb 3
auth-user-pass
route-delay 5
route-up lib_routes.bat
lib_routes.bat is the batch script:
route print
route delete 202.38.74.0 mask 255.255.255.0 %ifconfig_local%
route add 202.38.74.0 mask 255.255.255.0 202.38.93.126 metric 20
Here is the output:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 202.38.93.126 202.38.93.31 20
127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1
202.38.74.0 255.255.255.0 202.38.74.51 202.38.74.51 30
202.38.74.51 255.255.255.255 127.0.0.1 127.0.0.1 30
202.38.74.255 255.255.255.255 202.38.74.51 202.38.74.51 30
202.38.93.0 255.255.255.128 202.38.93.31 202.38.93.31 20
202.38.93.31 255.255.255.255 127.0.0.1 127.0.0.1 20
202.38.93.255 255.255.255.255 202.38.93.31 202.38.93.31 20
224.0.0.0 240.0.0.0 202.38.74.51 202.38.74.51 30
224.0.0.0 240.0.0.0 202.38.93.31 202.38.93.31 20
255.255.255.255 255.255.255.255 202.38.74.51 202.38.74.51 1
255.255.255.255 255.255.255.255 202.38.93.31 202.38.93.31 1
Default Gateway: 202.38.93.126
I have no idea how to avoid pushing that route to client.
--
sonnie
|