Negate specific configuration when using client config files

Scripts to manage certificates or generate config files

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

Post Reply
albertocastillo2001
OpenVpn Newbie
Posts: 19
Joined: Wed Oct 21, 2015 8:14 pm

Negate specific configuration when using client config files

Post by albertocastillo2001 » Thu Sep 21, 2017 9:41 pm

Hello

I have a server with a specific configuration. There's the push "redirect-gateway def1 bypass-dhcp" that I would like to disable for a specific client config file.
How can this be done?

Thanks

albertocastillo2001
OpenVpn Newbie
Posts: 19
Joined: Wed Oct 21, 2015 8:14 pm

Re: Negate specific configuration when using client config files

Post by albertocastillo2001 » Sun Sep 24, 2017 2:17 pm

Hello, any hint?

This is my current config althought I don't think it's needed

server
1
port 1194
2
proto udp
3
dev tun
4
topology subnet
5
ca ca.crt
6
cert server.crt
7
key server.key
8
dh dh1024.pem
9
server 10.8.0.0 255.255.255.0
10
ifconfig-pool-persist ipp.txt
11
push "route 192.168.11.0 255.255.255.0"
12
push "redirect-gateway def1 bypass-dhcp"
13
push "dhcp-option DNS 192.168.11.1"
14
keepalive 10 120
15
comp-lzo
16
persist-key
17
persist-tun
18
client-cert-not-required
19
username-as-common-name
20
plugin /usr/lib/openvpn/openvpn-plugin-auth-pam.so openvpn
21
status openvpn-status.log
22
verb 3

TiTex
OpenVPN Super User
Posts: 310
Joined: Tue Apr 12, 2011 6:22 am

Re: Negate specific configuration when using client config files

Post by TiTex » Thu Sep 28, 2017 7:04 am

you can firewall it :)
create a client config (see client-config-dir option in manual) , push a static ip to the client and firewall it
i don't know of another way to do this.

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Negate specific configuration when using client config files

Post by TinCanTech » Thu Sep 28, 2017 11:59 am

TiTex wrote:
Thu Sep 28, 2017 7:04 am
you can firewall it :)
That is not the answer.
TiTex wrote:
Thu Sep 28, 2017 7:04 am
create a client config (see client-config-dir option in manual)
Yes, and then use --push-remove for the specific client.

See --push-remove in The Manual v24x

Also, see --pull-filter in The Manual v24x

TiTex
OpenVPN Super User
Posts: 310
Joined: Tue Apr 12, 2011 6:22 am

Re: Negate specific configuration when using client config files

Post by TiTex » Thu Sep 28, 2017 12:26 pm

i don't see anywhere mentioned the version used is v2.4

User avatar
Pippin
Forum Team
Posts: 1201
Joined: Wed Jul 01, 2015 8:03 am
Location: irc://irc.libera.chat:6697/openvpn

Re: Negate specific configuration when using client config files

Post by Pippin » Thu Sep 28, 2017 12:39 pm

Code: Select all

push "redirect-gateway ..... ....."
can be pushed per client in ccd...

Version is unknown... but firewall could be needed anyway, against "smart clients" ...correct?

TinCanTech
OpenVPN Protagonist
Posts: 11139
Joined: Fri Jun 03, 2016 1:17 pm

Re: Negate specific configuration when using client config files

Post by TinCanTech » Thu Sep 28, 2017 12:44 pm

TiTex wrote:
Thu Sep 28, 2017 12:26 pm
i don't see anywhere mentioned the version used is v2.4
That is why we usually ask people to read this:
@albertocastillo2001 : HOWTO: Request Help !

If they don't then how are we to know what they really want ;)

Post Reply