From: Larsen <larsen007@web.de>
To: development@lists.ipfire.org
Subject: [PATCH] for Bug 13967 - OpenVPN is missing a way to use "block-outside-dns"
Date: Fri, 08 May 2026 11:44:55 +0000 [thread overview]
Message-ID: <1778240422246.3723185779.1317300897@web.de> (raw)
@@ -, +, @@
html/cgi-bin/ovpnmain.cgi | 13 +++++++++++++
langs/en/cgi-bin/en.pl | 1 +
2 files changed, 14 insertions(+)
--- a/html/cgi-bin/ovpnmain.cgi
+++ a/html/cgi-bin/ovpnmain.cgi
@@ -388,6 +388,9 @@ sub writeserverconf {
print CONF "push \"dhcp-option WINS $wins_server\"\n";
}
+ if ($vpnsettings{BLOCK_OUTSIDE_DNS} eq 'on') {
+ print CONF "push \"block-outside-dns\"\n";
+ }
if ($vpnsettings{MAX_CLIENTS} eq '') {
print CONF "max-clients 100\n";
}
@@ -1098,6 +1101,7 @@ if ($cgiparams{'ACTION'} eq
$Lang::tr{'save-adv-options'}) {
$vpnsettings{'DHCP_DOMAIN'} = $cgiparams{'DHCP_DOMAIN'};
$vpnsettings{'DHCP_DNS'} = $cgiparams{'DHCP_DNS'};
$vpnsettings{'DHCP_WINS'} = $cgiparams{'DHCP_WINS'};
+ $vpnsettings{'BLOCK_OUTSIDE_DNS'} = $cgiparams{'BLOCK_OUTSIDE_DNS'};
$vpnsettings{'ROUTES_PUSH'} = $cgiparams{'ROUTES_PUSH'};
$vpnsettings{'DATACIPHERS'} = $cgiparams{'DATACIPHERS'};
$vpnsettings{'DCIPHER'} = $cgiparams{'DCIPHER'};
@@ -2722,6 +2726,9 @@ ADV_ERROR:
$selected{'DPROTOCOL'}{'tcp'} = '';
$selected{'DPROTOCOL'}{$vpnsettings{'DPROTOCOL'}} = 'SELECTED';
+ $checked{'BLOCK_OUTSIDE_DNS'}{'off'} = '';
+ $checked{'BLOCK_OUTSIDE_DNS'}{'on'} = '';
+ $checked{'BLOCK_OUTSIDE_DNS'}{$vpnsettings{'BLOCK_OUTSIDE_DNS'}} =
'CHECKED';
$checked{'REDIRECT_GW_DEF1'}{'off'} = '';
$checked{'REDIRECT_GW_DEF1'}{'on'} = '';
$checked{'REDIRECT_GW_DEF1'}{$vpnsettings{'REDIRECT_GW_DEF1'}} =
'CHECKED';
@@ -2936,6 +2943,12 @@ END
<input type='TEXT' name='DHCP_WINS' value='$wins_servers' size='30'
/>
</td>
</tr>
+ <tr>
+ <td>$Lang::tr{'ovpn block outside dns'}</td>
+ <td>
+ <input type='checkbox' name='BLOCK_OUTSIDE_DNS'
$checked{'BLOCK_OUTSIDE_DNS'}{'on'} />
+ </td>
+ </tr>
</table>
<h6>$Lang::tr{'ovpn routing settings'}</h6>
--- a/langs/en/cgi-bin/en.pl
+++ a/langs/en/cgi-bin/en.pl
@@ -2068,6 +2068,7 @@
'override mtu' => 'Override default MTU',
'ovpn' => 'OpenVPN',
'ovpn add conf' => 'Additional configuration',
+'ovpn block outside dns' => 'Block outside DNS',
'ovpn ciphers' => 'Ciphers',
'ovpn con stat' => 'OpenVPN Connection Statistics',
'ovpn config' => 'OVPN-Config',
next reply other threads:[~2026-05-08 11:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 11:44 Larsen [this message]
2026-05-09 8:53 ` Michael Tremer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1778240422246.3723185779.1317300897@web.de \
--to=larsen007@web.de \
--cc=development@lists.ipfire.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox