diff --git a/security/tor/Makefile b/security/tor/Makefile
index b1a8ad207..f572a0758 100644
--- a/security/tor/Makefile
+++ b/security/tor/Makefile
@@ -1,5 +1,5 @@
PLUGIN_NAME= tor
-PLUGIN_VERSION= 1.6
+PLUGIN_VERSION= 1.7
PLUGIN_COMMENT= The Onion Router
PLUGIN_DEPENDS= tor ruby
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com
diff --git a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml
index 0ce2c4fe1..5997b877d 100644
--- a/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml
+++ b/security/tor/src/opnsense/mvc/app/controllers/OPNsense/Tor/forms/relay.xml
@@ -69,6 +69,12 @@
text
+
+ relay.dir_frontpage
+
+ checkbox
+ Upload a HTML file to /usr/local/etc/tor/exit-notice.html before enabling this to serve a directory frontpage.
+ relay.relay
diff --git a/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/Relay.xml b/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/Relay.xml
index 5048bcaf3..c81f06f8e 100644
--- a/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/Relay.xml
+++ b/security/tor/src/opnsense/mvc/app/models/OPNsense/Tor/Relay.xml
@@ -1,11 +1,16 @@
//OPNsense/tor/relay
+ 1.0.0Tor Relay configuration0Y
+
+ 0
+ Y
+ N/^([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])\.([1-9]?\d|1\d\d|2[0-4]\d|25[0-5])$/
diff --git a/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc b/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc
index 8853dddef..d8832e23a 100644
--- a/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc
+++ b/security/tor/src/opnsense/service/templates/OPNsense/Tor/torrc
@@ -196,11 +196,15 @@ RelayBandwidthBurst {{ OPNsense.tor.relay.bandwithburst }} KBytes
DirPort {% if helpers.exists('OPNsense.tor.relay.host') and OPNsense.tor.relay.host != '' %}{{ OPNsense.tor.relay.host }}:{% endif%}{{ OPNsense.tor.relay.directory_port }}
{% endif %}
-## Uncomment to return an arbitrary blob of html on your DirPort. Now you
+## Return an arbitrary blob of html on your DirPort. Now you
## can explain what Tor is if anybody wonders why your IP address is
## contacting them. See contrib/tor-exit-notice.html in Tor's source
## distribution for a sample.
-#DirPortFrontPage /usr/local/etc/tor/tor-exit-notice.html
+
+{% if helpers.exists('OPNsense.tor.relay.dir_frontpage') and OPNsense.tor.relay.dir_frontpage == '1' %}
+DirPortFrontPage /usr/local/etc/tor/exit-notice.html
+{% endif %}
+
{% if helpers.exists('OPNsense.tor.relay.exitenabled') %}
ExitRelay {{ OPNsense.tor.relay.exitenabled }}