Hi all, newbie here.
I've a CentOS 5 VPS running OpenVPN and nginx webserver. The client VPN is on a Windows 7 computer. The VPN works fine with all other website, except my own website (which is running on the same server as the OpenVPN). Is it possible to access my website (on the same server) through the VPN network? Because, when I access my website, it goes directly to the site without going through OpenVPN.
Here is my server config:
port 9201
proto udp
dev tun
ca ca.crt
cert server.crt
key server.key # This file should be kept secret
dh dh1024.pem
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "redirect-gateway bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
keepalive 10 120
cipher BF-CBC # Blowfish (default)
comp-lzo
persist-key
persist-tun
status openvpn-status.log
verb 3
mute 20
Client config:
client
dev tun
proto udp
remote [my_vps_ip] 9201
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client.crt
key client.key
cipher BF-CBC
comp-lzo
verb 3
mute 20
iptables configuration:
iptables -A FORWARD -o tun0 -j ACCEPT
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 -j SNAT --to-source [my_vps_ip]
Pardon me, because English is not my 1st language..