Cannot access server IP

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
akmalhisyam
OpenVpn Newbie
Posts: 3
Joined: Tue Oct 11, 2011 1:48 pm

Cannot access server IP

Post by akmalhisyam » Tue Oct 11, 2011 1:55 pm

Hi,
I've some problem in configuring my OpenVPN server.
When client is connected to the vpn, they can browse other website, but not the website hosted on the vpn server itself.

According to my traceroute output, when browsing other website, the traffic is routed trough the vpn, but when browsing the website on the server, it is routed through the default internet connection.

What did I do wrong?

User avatar
janjust
Forum Team
Posts: 2703
Joined: Fri Aug 20, 2010 2:57 pm
Location: Amsterdam
Contact:

Re: Cannot access server IP

Post by janjust » Tue Oct 11, 2011 2:53 pm

you didn't do anything wrong: openvpn needs a directed (i.e. non-VPN-ed) route to the VPN server itself; if you want to view a website hosted on the VPN server itself then browse to the VPN IP of the server, e.g. https://10.8.0.1

if you want https://<site> to always go via the VPN tunnel then you'll need to pull some DNS tricks

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Cannot access server IP

Post by Mimiko » Tue Oct 11, 2011 5:02 pm

I thread with same problem: topic8992.html
Try using iptables.

akmalhisyam
OpenVpn Newbie
Posts: 3
Joined: Tue Oct 11, 2011 1:48 pm

Re: Cannot access server IP

Post by akmalhisyam » Tue Oct 11, 2011 7:46 pm

Thanks!
I tought i did something wrong.

and thanks for this mimiko :)
Having OpenVPN client on the LAN as a gw for those computers and is installed on linux, you can use iptables to rewrite destination ip for the OpenVPN server from public IP to OpenVPN IP:

Code: Select all

iptables -A FORWARD -i eth0{LAN} -d {OpenVPN server public IP} --gw {OpenVPN server tunnel IP}
Check the correct sintax, because am low on iptables,

akmalhisyam
OpenVpn Newbie
Posts: 3
Joined: Tue Oct 11, 2011 1:48 pm

Re: Cannot access server IP

Post by akmalhisyam » Tue Oct 11, 2011 7:53 pm

i have another question,
how to monitor clients bandwith usage?
I prefer a web GUI..

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: Cannot access server IP

Post by Mimiko » Tue Oct 11, 2011 8:19 pm

For a GUI monitor - try googling and search. I don't know anyone except a full iso linux based system with GUI and firewall and internet shaping.
Usually for bandwith monitur is used "iptables" statistics and "interface" statistics.

Post Reply