OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Tutorials and FAQs »
  • Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« previous next »
  • Print
Pages: 1 [2] 3

Author Topic: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)  (Read 26006 times)

beclar2

  • Newbie
  • *
  • Posts: 32
  • Karma: 8
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 :-)
« Reply #15 on: January 08, 2018, 07:55:50 pm »
Just for the records if anyone looks at this thread and for everyone using dnscrypt (and wondering why lookups won´t work anymore):

It seems that dnscrypt is abandoned: https://www.reddit.com/r/privacy/comments/7oyw0h/dnscrypt_is_now_abandoned/

Logged

cake

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 13
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #16 on: January 31, 2018, 01:14:56 am »
Upgraded to 18.1 this morning.
The upgrade went fine, then after reboot no dns. (drill example.com)
Went to System --> Settings --> General and changed everything to 8.8.8.8 and 8.8.4.4 just for a while.
SSH into shell and checked ping and drill, working, followed from first post again.
Code: [Select]
mv /usr/local/etc/rc.d/dnscrypt-proxy /usr/local/etc/rc.d/dnscrypt-proxy.original
nano /usr/local/etc/rc.d/dnscrypt-proxy

And pasted this in again
Code: [Select]
#!/bin/sh
#
# $FreeBSD: head/dns/dnscrypt-proxy/files/dnscrypt-proxy.in 373758 2014-12-02 09:21:49Z xmj $
#
# PROVIDE: dnscrypt_proxy
# REQUIRE: SERVERS cleanvar
# BEFORE: named local_unbound unbound
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable dnscrypt-proxy:
#
# dnscrypt_proxy_instances (str): Set to "dnscrypt_proxy" by default.
#  List of dnscrypt_proxy instance id's,
#  e.g. "dnscrypt_proxy_1 dnscrypt_proxy_2", etc.
# {instance_id}_enable (bool):  Set to NO by default.
#  Set to YES to enable dnscrypt-proxy.
# {instance_id}_uid (str):  Set to "_dnscrypt-proxy" by default.
#      User to switch to after starting.
# {instance_id}_resolver (str):  Set to "opendns" by default.
#      Choose a different upstream resolver.
# {instance_id}_pidfile (str):  default: "/var/run/dnscrypt-proxy.pid"
#      Location of pid file.
# {instance_id}_logfile (str):    default: "/var/log/dnscrypt-proxy.log"
#  Location of log file.
#
# To redirect a local resolver through dnscrypt-proxy, point it at 127.0.0.2
# and add the following to rc.conf:
# ifconfig_lo0_alias0="inet 127.0.0.2 netmask 0xffffffff"
# dnscrypt_proxy_flags='-a 127.0.0.2'

. /etc/rc.subr

name=dnscrypt_proxy

load_rc_config ${name}

: ${dnscrypt_proxy_instances="${name}"}
: ${dnscrypt_proxy_enable:=NO}

dnscrypt_proxy_enable_tmp=${dnscrypt_proxy_enable}

command=/usr/local/sbin/dnscrypt-proxy
procname=/usr/local/sbin/dnscrypt-proxy

for i in $dnscrypt_proxy_instances; do
  name=${i}

  eval ${name}_enable=${dnscrypt_proxy_enable_tmp}
  rcvar=${name}_enable

  load_rc_config ${i}

  eval dnscrypt_proxy_uid_tmp=\${${i}_uid}
  eval dnscrypt_proxy_resolver_tmp=\${${i}_resolver}
  eval dnscrypt_proxy_pidfile_tmp=\${${i}_pidfile}
  eval dnscrypt_proxy_logfile_tmp=\${${i}_logfile}

:  ${dnscrypt_proxy_uid_tmp:=_dnscrypt-proxy}  # User to run daemon as
:  ${dnscrypt_proxy_resolver_tmp:=opendns}  # resolver to use
:  ${dnscrypt_proxy_pidfile_tmp:=/var/run/${i}.pid} # Path to pid file
:  ${dnscrypt_proxy_logfile_tmp:=/var/log/${i}.log} # Path to log file

  command_args="-d -p ${dnscrypt_proxy_pidfile_tmp} -l ${dnscrypt_proxy_logfile_tmp} -u ${dnscrypt_proxy_uid_tmp} -R ${dnscrypt_proxy_resolver_tmp}"

  pidfile=${dnscrypt_proxy_pidfile_tmp}

  _rc_restart_done=false # workaround for: service dnscrypt-proxy restart

  run_rc_command "$1"
done

Make it executable
Code: [Select]
chmod a+x /usr/local/etc/rc.d/dnscrypt-proxy
Update the resolver list with this new place on github
Code: [Select]
wget -O /usr/local/share/dnscrypt-proxy/dnscrypt-resolvers.csv https://github.com/dyne/dnscrypt-proxy/raw/master/dnscrypt-resolvers.csv
Change the resolvers to the one you want
Code: [Select]
nano /etc/rc.confMine looks like this:
Code: [Select]
ddclient_enable="YES"
dnscrypt_proxy_enable="YES"
dnscrypt_proxy_instances="dnscrypt_proxy_1 dnscrypt_proxy_2 dnscrypt_proxy_3"
dnscrypt_proxy_1_resolver="ipredator"
dnscrypt_proxy_1_flags="-a 127.0.0.2:53 -l /var/log/"
dnscrypt_proxy_2_resolver="soltysiak"
dnscrypt_proxy_2_flags="-a 127.0.0.3:53 -l /var/log/"
dnscrypt_proxy_3_resolver="dnscrypt.eu-dk"
dnscrypt_proxy_3_flags="-a 127.0.0.4:53 -l /var/log/"
Then start dnscrypt
Code: [Select]
service dnscrypt-proxy restart
Lastly I went back to System --> Settings --> General and changed the list back to 127.0.0.2 ; 127.0.0.3 and 127.0.0.4 for the WAN gateway.

Checked to make sure all is working with https://ipleak.net/

Big Thanx to the devs and the people making and improving opnsense.
« Last Edit: January 31, 2018, 11:40:57 pm by cake »
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17706
  • Karma: 1618
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 :-)
« Reply #17 on: January 31, 2018, 07:35:36 am »
Hi cake,

Thanks, maybe we want to finally put this into a plugin?

Michael, do you read this?  :)


Cheers,
Franco
Logged

cake

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 13
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #18 on: February 01, 2018, 12:08:08 am »
I noticed I did something wrong because dnscrypt-proxy does not start after reboot. I must type in "service dnscrypt-proxy start" in the shell. Not sure what I did wrong. lol

/etc/rc.conf is root:wheel and not executable (I think that is correct)

If anybody else knows let me know :-) I may just use a cron job @reboot because my skills are poor.

Yes Franco a plugin would be nice. Cheers
Logged

w2712663

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 :-)
« Reply #19 on: February 04, 2018, 06:18:15 pm »
Quote from: beclar2 on January 08, 2018, 07:55:50 pm
It seems that dnscrypt is abandoned: https://www.reddit.com/r/privacy/comments/7oyw0h/dnscrypt_is_now_abandoned/

No. DNSCrypt is not abandoned. In fact, DNSCrypt-proxy v2 has been released (written from scratch in Go by the original author of DNS-Crypt proxy, Frank Denis). The new DNS-Crypt v2 supports things like multiple DNS resolvers in a single process and alternate DNS encryption protocols like DNS-over-TLS (used by Quad9), DNS-over-HTTPS (successor to DNS-over-TLS and best acronym award winner, doh!) and DNSCrypt v2 protocol.

Anyway it would be great to get an updated tutorial using the new DNS-Crypt proxy.

Also, for anyone that doesn't know, the official DNSCrypt resolver lists are back (and now include a list of v2 protocol resolvers): https://github.com/DNSCrypt/dnscrypt-resolvers
« Last Edit: February 04, 2018, 06:22:50 pm by w2712663 »
Logged

beclar2

  • Newbie
  • *
  • Posts: 32
  • Karma: 8
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #20 on: February 05, 2018, 08:39:04 am »
Quote from: cake on February 01, 2018, 12:08:08 am
I noticed I did something wrong because dnscrypt-proxy does not start after reboot. I must type in "service dnscrypt-proxy start" in the shell. Not sure what I did wrong. lol

/etc/rc.conf is root:wheel and not executable (I think that is correct)

If anybody else knows let me know :-) I may just use a cron job @reboot because my skills are poor.
Cake, did you read this post?
Logged

nikkon

  • Full Member
  • ***
  • Posts: 124
  • Karma: 3
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #21 on: February 05, 2018, 01:51:54 pm »
+1 for the plugin :)
Logged
DEC750 Deciso

cake

  • Jr. Member
  • **
  • Posts: 64
  • Karma: 13
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #22 on: February 05, 2018, 01:53:04 pm »
Quote from: beclar2 on February 05, 2018, 08:39:04 am
Quote from: cake on February 01, 2018, 12:08:08 am
I noticed I did something wrong because dnscrypt-proxy does not start after reboot. I must type in "service dnscrypt-proxy start" in the shell. Not sure what I did wrong. lol

/etc/rc.conf is root:wheel and not executable (I think that is correct)

If anybody else knows let me know :-) I may just use a cron job @reboot because my skills are poor.
Cake, did you read this post?

Thanks, It worked!
I did read your post, I must be getting a little alzheimer's. So I guess the tutorial on the first post is now a little wrong?  I'll try and edit it tomorrow, but it sounds like the whole thing may be out of date as w2712663 mentions there is a updated version. yay!
Thanks again.
Logged

ibb27

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #23 on: February 22, 2018, 09:24:20 am »
Quote from: nikkon on February 05, 2018, 01:51:54 pm
+1 for the plugin :)
+1 from me too  :)
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 :-)
« Reply #24 on: September 16, 2018, 04:27:41 pm »
Quote from: franco on January 31, 2018, 07:35:36 am
Hi cake,

Thanks, maybe we want to finally put this into a plugin?

Michael, do you read this?  :)


Cheers,
Franco

Now I read it :D
Still anyone interested in a Plugin? :)
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17706
  • Karma: 1618
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #25 on: September 17, 2018, 05:52:00 pm »
Yep *ducks*
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #26 on: September 17, 2018, 05:54:32 pm »
I'd need 1 or better 2-3 productive sample configs
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

Benqer

  • Newbie
  • *
  • Posts: 21
  • Karma: 1
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #27 on: September 25, 2018, 11:54:41 pm »
Gibt es schon neuigkeiten zum Plugin?


Any news about the plugin?
Logged

mimugmail

  • Hero Member
  • *****
  • Posts: 6767
  • Karma: 494
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #28 on: September 26, 2018, 06:07:05 am »
Quote from: mimugmail on September 17, 2018, 05:54:32 pm
I'd need 1 or better 2-3 productive sample configs
Logged
WWW: www.routerperformance.net
Support plans: https://www.max-it.de/en/it-services/opnsense/
Commercial Plugins (German): https://opnsense.max-it.de/

marcelmah

  • Jr. Member
  • **
  • Posts: 61
  • Karma: 3
    • View Profile
Re: Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
« Reply #29 on: October 01, 2018, 11:23:40 am »
I'm looking into securing my DNS.
Why would we want a plugin for this while the project itself is dead (or am I wrong?).

It looks like getdns using Stubby is the way to go, right? plz. correct me if I'm wrong.
Logged

  • Print
Pages: 1 [2] 3
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Tutorials and FAQs »
  • Multiple dnscrypt-proxy Opnsense 16.7 / 17.1 / 17.7 / 18.1 :-)
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2