You're doing OK so far, and are on the right track. Lets break it down and solve one problem at a time.
- Problem 1: you would like client traffic to go through the VPN. Which means, you can visit a website such as whatismyip.com from your client, and see the external IP of your VPN server. Am I understanding the first part of your problem correctly?
First:
push redirect-gateway 10.8.0.5
^ won't do anything.
The correct syntax is:
push "redirect-gateway def1"
The above code will redirect every client's traffic through the VPN. Next will be a proper IPTABLES or firewall setup, because OpenVPN it-self does not do forwarding.
Something like:
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
--------------------------------------------------------------
With the above done. Take a break. Make sure it all works.
If not working, ask again how to get it working.
--------------------------------------------------------------
- Problem 2: Understand the local IP addressing
mrebbert wroteIt assigns 10.8.0.6 with a subnet 255.255.255.252 and a gateway of 10.8.0.5. Not sure where that is set though. Any insight?
If you want an IP addressing scheme which is less mind boggling then add:
topology subnet
to your server.conf.
Then your default gateway will be
10.8.0.1, and your client IP's will automatically be assigned as
10.8.0.2,
10.8.0.3,
10.8.0.4, etc.