Push webdomains to clients

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
sergani
OpenVPN User
Posts: 22
Joined: Fri May 13, 2011 2:47 pm
Location: Cairo, EG

Push webdomains to clients

Post by sergani » Sun May 15, 2011 9:29 am

Dear all,

I've been able to push specific IP addresses, or even subnets, and it's working beautifully!
Can one expand this as well to push website names as well?

Case: I would like to push www.example.com to my clients, as well as www.yahoo.com etc... I mean selective website names.
///Sergani

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

Re: Push webdomains to clients

Post by janjust » Sun May 15, 2011 9:01 pm

add

Code: Select all

allow-pull-fqdn
to the client config ; with that you can use

Code: Select all

push "www.google.com 255.255.255.255"
and the likes.

sergani
OpenVPN User
Posts: 22
Joined: Fri May 13, 2011 2:47 pm
Location: Cairo, EG

Re: Push webdomains to clients

Post by sergani » Sun May 15, 2011 10:00 pm

Thanks a lot man!!!
Can't thank you enough!!!
///Sergani

Douglas
Forum Team
Posts: 285
Joined: Wed Aug 27, 2008 2:41 am

Re: Push webdomains to clients

Post by Douglas » Mon May 16, 2011 2:59 am

janjust wrote:add

Code: Select all

allow-pull-fqdn
to the client config ; with that you can use

Code: Select all

push "www.google.com 255.255.255.255"
and the likes.
I didn't know this. Bookmarked this post for future reference.

sergani
OpenVPN User
Posts: 22
Joined: Fri May 13, 2011 2:47 pm
Location: Cairo, EG

Re: Push webdomains to clients

Post by sergani » Mon May 16, 2011 8:51 am

Ok so I've been fooling around for a while and all's working fantastically well!

Is it possible to route *.yahoo.com through the VPN server? Currently what I push is what I route; www.yahoo.com. Say for example I need to route mail.yahoo.com and such, what should I do?
I tried .yahoo.com 0.0.0.0 but that did nothing, as expected. I didn't read anything about OpenVPN making use of regex.
///Sergani

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

Re: Push webdomains to clients

Post by janjust » Mon May 16, 2011 8:55 am

openvpn does not use regexp for this; wildcards would never work in this case, as you'd have conditional routing based on a DNS name - I am not aware of any software that can do that on the networking (L3) level. As I said, you'd be better off usiing a SOCKS proxy for this.

Post Reply