On my VPS I have 2 additional IP's. I want to configure my current OpenVPN configuration to allow me to change what IP my clients connect to by request.
My current configuration is set to a static IP I believe. Heres the guide I used :
https://library.linode.com/networking/openvpn/debian-6-squeeze
And my current setup works flawlessly. The problem is that I have 2 IP's I want to take advantage of.
Any help would be appreciated 😃
Here is my current server.conf
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.0.1"
port 1194
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
cipher AES-256-CBC
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 0
One of my client conf's.
client
dev tun
proto udp
remote my.server.vps.ip 1194
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client04.crt
key client04.key
ns-cert-type server
cipher AES-256-CBC
comp-lzo
verb 5
My IP Tables, I also run these in my rc.local.
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.1/24 -j ACCEPT
iptables -A FORWARD -j REJECT
iptables -t nat -A POSTROUTING -s 10.8.0.1/24 -j SNAT --to-source my.server.vps.ip