[Resolved] Client-Server Network Traffic
Posted: Sun May 13, 2012 1:39 pm
Hello again!
I finally got the VPN set up and working! (I Just did a clean install using the EPEL .rpm and re-following the steps. The second time going through it I hit a lot less bumps!)
Background
The server is in a datacenter and I am installing OpenVPN in it to channel my traffic through to it. Everything was done through root/administrative accounts.
The Goal
To get all my network/web browsing traffic to go through my VPS connection.
The Problem
As you probably have guessed, I can't get my traffic to go through the server.
Here are the stats:
Server Side:
produces the following:
Client Computer Stats:
- Windows 7
- OpenVPN Client is running as Admin
Server Stats:
- Server-Name is Echo (therefore echo-client1.crt etc. makes sense)
- CentOS 6 64-bit server
So...
Question 1: What else do I need to do in order to have all my client-side computer's traffic go through my server?
Question 2: (This is Unrelated to the above mentioned problem) I've moved everything into /etc/openvpn but it does not auto-start on start-up. How would I do that?
Anyways, thanks again for all your help!
I finally got the VPN set up and working! (I Just did a clean install using the EPEL .rpm and re-following the steps. The second time going through it I hit a lot less bumps!)
Background
The server is in a datacenter and I am installing OpenVPN in it to channel my traffic through to it. Everything was done through root/administrative accounts.
The Goal
To get all my network/web browsing traffic to go through my VPS connection.
The Problem
As you probably have guessed, I can't get my traffic to go through the server.
Here are the stats:
Server Side:
Running the command on server: ifconfigport 1194
proto udp
dev tun
ca keys/ca.crt
cert keys/server.crt
key keys/server.key # This file should be kept secret
dh keys/dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
client-to-client
keepalive 10 120
comp-lzo
max-clients 50
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 3
produces the following:
I also ran the following command on the server:lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:127.0.0.1 P-t-P:127.0.0.1 Bcast:0.0.0.0 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
RX packets:7248 errors:0 dropped:0 overruns:0 frame:0
TX packets:5532 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:795371 (776.7 KiB) TX bytes:832660 (813.1 KiB)
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:198.144.178.19 P-t-P:198.144.178.19 Bcast:198.144.178.19 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
Client Side:iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o venet0 -j MASQUERADE
When I connect to the VPN server on the client-side I cannot access the internet (e.g. typing in google.com in a web browser or pinging it times out). However, I can ping 10.8.0.1 on the client side. On the server side I can ping google.com and other websites.client
dev tun
proto udp
remote 198.144.178.19 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert echo-client2.crt
key echo-client2.key
ns-cert-type server
comp-lzo
verb 3
push "dhcp-option DNS 10.8.0.1"
Client Computer Stats:
- Windows 7
- OpenVPN Client is running as Admin
Server Stats:
- Server-Name is Echo (therefore echo-client1.crt etc. makes sense)
- CentOS 6 64-bit server
So...
Question 1: What else do I need to do in order to have all my client-side computer's traffic go through my server?
Question 2: (This is Unrelated to the above mentioned problem) I've moved everything into /etc/openvpn but it does not auto-start on start-up. How would I do that?
Anyways, thanks again for all your help!