Projekat

Općenito

Profil

Openvpn

instaliramo openvpn

sudo apt-get install openvpn

podesimo clinet.conf

/etc/openvpn$ vi client.conf

client
dev tun
proto udp

#openvpn server - port
remote officesa.sigma-com.net  1194

resolv-retry infinite
pull
comp-lzo
nobind

persist-key
persist-tun

#lokacija ključeva
ca /etc/openvpn/bring.out.ba.crt
cert /etc/openvpn/bjasko.crt
key /etc/openvpn/bjasko.key

ping 60

sudo invoke-rc.d openvpn restart

ako je sve OK

ifconfig

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  
          inet addr:10.8.0.179  P-t-P:10.8.0.1  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ostaje još dodati rutu prema mreži kojoj VPN-om pristupamo ovo možemo dodati u /etc/rc.local

#openvpn officesa ruta
route  add -net  192.168.45.0 netmask 255.255.255.0 gateway 10.8.0.179 dev tun0

provjerimo

bjasko@bjasko-jaunty-904:/etc/openvpn$ ip route show

10.8.0.1 dev tun0  proto kernel  scope link  src 10.8.0.179 
192.168.45.0/24 via 10.8.0.179 dev tun0  scope link

..OK