Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - opn_minded

#1
Hallo opnsense-Community,

ich hätte ein paar Fragen betreffend AGH, zunächst jedoch mein Setup.

  • OPNsense 25.1.3-amd64
  • AGH v0.107.57

Ich habe bis dato mit unbound (inkl.) Blocklists gearbeitet, nun aber gesehen dass AGH doch sehr gute Werkzeuge mit an Bord hat um zu "switchen". Allen voran die Client-basierten Möglichkeiten klingen spannend.

AGH läuft aktuell (als primary DNS) und nutzt unbound als Resolver, ich habe hier jedoch relativ hohe Antwortzeiten (~200-250ms).
Direkt über unbound läuft das performanter, direkt über AGH ebenso (bei identen Blocklists) -> hier meine erste Frage: an was kann das liegen, respektive wie kann man das optimieren?
(siehe auch ein ähnliches Problem hier: https://forum.opnsense.org/index.php?topic=44439.msg221745#msg221745)

Meine zweite Frage betrifft die definierten upstream-Server, in diesem Falle direkt über AGH.

Trage ich hier bspw. (basierend auf https://adguard-dns.io/kb/de/general/dns-providers/)


ein, bekomme ich eine Fehlermeldung: "Server ,,tls://security.cloudflare-dns.com:853": konnte nicht verwendet werden, bitte überprüfen Sie die korrekte Schreibweise".

Trage ich tls://dns.adguard-dns.com ein, funktioniert alles fehlerfrei - und das bringt mich zu meiner zweite Frage: an was kann das liegen?

Ich habe absolut nichts an den Bootstrap-DNS-Server geändert, der Adguard-DNS funktioniert ja - nur der Rest eben nicht.

Danke euch für eure Zeit und schönen Tag!

Aktuelle CFG (Ausschnitt):

http:
  pprof:
    port: 6060
    enabled: false
  address: <OPNSENSE_IP>:3000
  session_ttl: 720h
users:
  - name: <AGH_USER>
    password: <AGH_PASSWORD>
auth_attempts: 5
block_auth_min: 15
http_proxy: ""
language: ""
theme: auto
dns:
  bind_hosts:
    - <OPNSENSE_IP>
    - <VLAN_A>
    - <VLAN_B>
    - <VLAN_C>
    - <VLAN_D>
    - <VLAN_E>
    - <VLAN_F>
    - 127.0.0.1
  port: 53
  anonymize_client_ip: false
  ratelimit: 20
  ratelimit_subnet_len_ipv4: 24
  ratelimit_subnet_len_ipv6: 56
  ratelimit_whitelist: []
  refuse_any: true
  upstream_dns:
    - '[/*.<LOCALDOMAIN>/]127.0.0.1:<UNBOUND_PORT>'
    - 127.0.0.1:<UNBOUND_PORT>
  upstream_dns_file: ""
  bootstrap_dns:
    - 9.9.9.10
    - 149.112.112.10
    - 2620:fe::10
    - 2620:fe::fe:10
  fallback_dns: []
  upstream_mode: load_balance
  fastest_timeout: 1s
  allowed_clients: []
  disallowed_clients: []
  blocked_hosts:
    - version.bind
    - id.server
    - hostname.bind
  trusted_proxies:
    - 127.0.0.0/8
    - ::1/128
  cache_size: 4194304
  cache_ttl_min: 0
  cache_ttl_max: 0
  cache_optimistic: false
  bogus_nxdomain: []
  aaaa_disabled: false
  enable_dnssec: true
  edns_client_subnet:
    custom_ip: ""
    enabled: false
    use_custom: false
  max_goroutines: 300
  handle_ddr: true
  ipset: []
  ipset_file: ""
  bootstrap_prefer_ipv6: false
  upstream_timeout: 2s
  private_networks: []
  use_private_ptr_resolvers: true
  local_ptr_upstreams:
    - 127.0.0.1:<UNBOUND_PORT>
  use_dns64: false
  dns64_prefixes: []
  serve_http3: false
  use_http3_upstreams: false
  serve_plain_dns: true
  hostsfile_enabled: true
tls:
  enabled: false
  server_name: ""
  force_https: false
  port_https: 443
  port_dns_over_tls: 853
  port_dns_over_quic: 853
  port_dnscrypt: 0
  dnscrypt_config_file: ""
  allow_unencrypted_doh: false
  certificate_chain: ""
  private_key: ""
  certificate_path: ""
  private_key_path: ""
  strict_sni_check: false
querylog:
  dir_path: ""
  ignored: []
  interval: 24h
  size_memory: 1000
  enabled: true
  file_enabled: true
statistics:
  dir_path: ""
  ignored: []
  interval: 24h
  enabled: true
filters:
  - enabled: false
    url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_1.txt
    name: AdGuard DNS filter
    id: 1
  - enabled: false
    url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_2.txt
    name: AdAway Default Blocklist
    id: 2
  - enabled: true
    url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_48.txt
    name: HaGeZi's Pro Blocklist
    id: 1742110114
  - enabled: true
    url: https://adguardteam.github.io/HostlistsRegistry/assets/filter_27.txt
    name: OISD Blocklist Big
    id: 1742110115
whitelist_filters: []
user_rules:
  - <REDACTED>
dhcp:
  enabled: false
  interface_name: ""
  local_domain_name: lan
  dhcpv4:
    gateway_ip: ""
    subnet_mask: ""
    range_start: ""
    range_end: ""
    lease_duration: 86400
    icmp_timeout_msec: 1000
    options: []
  dhcpv6:
    range_start: ""
    lease_duration: 86400
    ra_slaac_only: false
    ra_allow_slaac: false
filtering:
  blocking_ipv4: ""
  blocking_ipv6: ""
  blocked_services:
    schedule:
      time_zone: Local
    ids: []
  protection_disabled_until: null
  safe_search:
    enabled: false
    bing: true
    duckduckgo: true
    ecosia: true
    google: true
    pixabay: true
    yandex: true
    youtube: true
  blocking_mode: default
  parental_block_host: family-block.dns.adguard.com
  safebrowsing_block_host: standard-block.dns.adguard.com
  rewrites:
    - domain: <CLIENT>.<LOCALDOMAIN>
      answer: <ANSWER>
  safe_fs_patterns:
    - /usr/local/AdGuardHome/userfilters/*
  safebrowsing_cache_size: 1048576
  safesearch_cache_size: 1048576
  parental_cache_size: 1048576
  cache_time: 30
  filters_update_interval: 24
  blocked_response_ttl: 10
  filtering_enabled: true
  parental_enabled: false
  safebrowsing_enabled: false
  protection_enabled: true
clients:
  runtime_sources:
    whois: true
    arp: true
    rdns: true
    dhcp: true
    hosts: true
  persistent: []
log:
  enabled: true
  file: ""
  max_backups: 0
  max_size: 100
  max_age: 3
  compress: false
  local_time: false
  verbose: false
os:
  group: ""
  user: ""
  rlimit_nofile: 0
schema_version: 29

#2
Hi, just wanted to know if someone could tell me what I need to if wanted to route all internal DNS-requests (xyz.localhub) to unbound (overrides) and the rest to Proton's DNS server (10.2.0.1)? Thank you!
#3
 I've got a setup with two working WG ProtonVPN-tunnels, but I am facing DNS leaks. This is due to the fact that I need unbound to resolve my local domain (.localhub), obv. because Proton's DNS server can't do that. For external requests, I'm using DNS over TLS towards Cloudflares' DNS servers.

As of now, I'm working with overrides, so e.g. "test.localhub" would have an A-entry with value 10.0.0.99.

I have two question in that regard;

1) Can someone please tell me why clients in my network, that use this WG tunnel have issues browsing e.g. with Reddit? (as an example: if not logged in, I can't access Reddit due to "security issues" -> Reddit tells me I need to login to do anything. In contrast, when I start the native ProtonVPN client on my PC and connect to to the same ProtonVPN server, it's working fine without any issues)

2) What do I need to do, so that opnSense can distinguish between a local DNS request (basically *.localhub) and an outbound DNS request? (assuming this would prevent DNS leaks and prevent occasional "browsing issues" like mentioned with Reddit)

Thanks for your time, have a great day!
#4
i've came up with pings initially, following https://forum.opnsense.org/index.php?topic=38485.0. but, tbh, i thought there should be a more "straight-forward" approach as the tunnel status information is already available in a system widget (as mention below; online/offline).

so that's why i was asking how to get this (.. already available) tunnel status information into monit to tell it "if tunnel wg1 status changes from online to offline -> restart wg1".

thanks for your answer, i've set it up like described in the link below.
#5
Hi there,

can someone please tell me how to get the WG tunnel status information (online/offline as shown in the dashboard widget) into monit for further action?

Background: I want monit, if a tunnel goes from online to offline, to restart that tunnel. Monit is already set up, the defined (execute) are tested and should work.
#6
OK, i understood it that way that all hosts of a certain internal domain (.zzz) are forwarded to a specific dns server. Thanks for clarification.
#7
Hi mate, of course I can live with CloudFlare as I've set them for DoT - just wanted to understand what's happening. In that matter, many thanks for your time and reply.

I got it working for my Guest VLAN (where I can run such tests w/o any interruption). In fact..

1) I provide a specific domain for all clients in that Guest VLAN (zzzguest)
2) I configured unbound to forward requests of that domain (zzzguest) towards the tunnel DNS IP of ProtonVPN

What I don't understand: in unbound, via DOT, I've two entries for CloudFlare (1.0.0.2 and 1.1.1.2). Currently, the domain is empty (what equals "fetch all domains"). If I set this to my standard domain (zzz), I can't resolve anything. Even after multiple dns-flushes.

#8
Hi there,

I need some help regarding the following; I have set up a WG ProtonVPN tunnel, that works fine. So basically I followed the official docs, with one difference -> I'm not routing particular clients over the tunnel, but a whole VLAN.

Now, while browsing https://ip.me/ it shows the correct IP, but https://dnsleaktest.com/ tells me that DNS requests are answered by Cloudflare, not ProtonVPN.

opnSense's DNS is unbound, which is actually configured to use Cloudflares' 1.1.1.1 and 1.1.1.2, but unbound is not(!) listening on the affected VLAN.

KEA is serving as DHCP and offers 10.2.0.1 (ProtonVPNs' tunnel DNS) and 1.1.1.1 (because if I remove the latter, resolving doesn't work at all). I'm aware that DNS offerings are not sequential, but random.

What's even more curious is, that in the live view I can see DNS requests being made towards 10.2.0.1.

Can you point me into a direction where I could search for issues?

Thanks in advance!
#9
Hi there,

could someone please point me in the right direction? Here's what I've got (works fine!);


  • WAN -> standard gateway
  • WG1 -> wireguard gateway for specific VLANs
  • WG1 -> wireguard gateway 2 for specific VLANs

What do I need to do that if either one WG1/WG2 fails it connects to the other and if both fail the standard WAN gateway should be used?

Thanks in advance!
#10
Hi there,

I'm Sorry for my late reply, didn't catch your answer (somehow I wasn't notified via eMail). Just wanted to say I've got it working - just followed the guide all over again and now it works :).

It seems it had to do with the rule in the affected VLAN that causes the clients to be routed to the WG interface/gateway.
#11
Dear all,

could you please help me with the following; I'm a Proton(VPN) user and set up a Wireguard VPN connection following https://docs.opnsense.org/manual/how-tos/wireguard-client-proton.html, respectively https://docs.opnsense.org/manual/how-tos/wireguard-selective-routing.html (as step 6 and ongoing).

Sidenote; the only difference would be that I've set up the according rules as floating, as the clients which shall use the tunnel reside in different VLANs.

The WG instance is "up", the corresponding peer has a recent handshake entry.
The gateway is "online" with 0.0 loss.

Now to my issue -> as soon as I enter my mobile phone for testing to the alias (clients which shall use the tunnel), I can't reach any non-internal hosts anymore (browsing the web, Firefox shows a black screen and an error message "this website requires a secure connection" / HSTS).

In the FW logs, I can see that the rules that I've added during the setup trigger pass, so no blocks for the test client.

I've ran that setup now three times, but always with the same negative result.

To test the ProtonVPN-conf itself I loaded it directly into my Fritzbox for testing purposes, that's working like a charm (so basically all traffic is now on the tunnel, I could also live with that :) ).

To summarize;

  • the underlying ProtonVPN is working fine -> tested on Fritzbox
  • the WG instance/peer combination is working fine -> instance is "up", peer has a recent handshake
  • the gateway is online, 0.0 loss

Many thanks in advance for your time in advance!
#12
hi there, thanks for confirmation (regarding the grouping of ovpn IFs).

got it working after installing 24.1.1 (i doubt that's the reason, because looking into https://forum.opnsense.org/index.php?topic=38644.0 the only ovpn-relevant change has nothing to do with my reported issue).

tbh, didn't change my "approach"; deactivate old "server" -> set up new "instance" -> export profile -> activate "instance" -> connection / accessibility checks.

again, thanks for your time, cs1!
#13
Hi there,

so I've got a working ovpn server (legacy!) and, coming with 24.1, its menu entry is now flagged as "legacy". So I decided to give the new instance GUI a try.

Currently I've set up various rules under Firewall > Rules > openVPN that are working (yes, I can see them under Firewall > Log Files > Live View (e.g.)). Although I've never set up an IF for ovpn via Interfaces > Assignments, I always had that particular menu entry as described earlier.

So, back to topic. I've set up the instance, exported the ovpn profile and I'm able to connect. I can see the client under VPN > OpenVPN > Connection Status and an IP address that is within the specified IP-range.

But.. now the FW rule menu entry is gone and my client is not able to do anything. I understand this behavior as it's "block everything" by default.

My question now is, how do I get this working - do I have to manually assign an IF for the new instance and create new rules for ovpn from scratch?

Many thanks for your time!
#14
23.1 Legacy Series / Re: unbound - empty reporting
February 26, 2023, 08:50:19 AM
i tried now with several blocklist-formats:
- https://big.oisd.nl/unbound: lines: 278030 exclude: 278021 block: 0, doesn't seem to be recognized???
- https://big.oisd.nl: lines: 278029 exclude: 278028 block: 0, same as above???
- https://hosts.oisd.nl: lines: 856384 exclude: 0 block: 856376, works

q1) does anyone know why a dedicated unbound-formatted blocklist would have "block: 0" after download?
q2) after testing several blocklists above, suddenly the reporting started to work again. does anyone have the same behavior?
#15
23.1 Legacy Series / unbound - empty reporting
February 24, 2023, 10:06:43 AM
hi!

i'm on OPNsense 23.1.1_2.

when i have a look under reporting > unbound dns, the "main stats" "total"/"resolved"/"block" remain the same for days, only the "size of blocklist" varies.

i'm using hosts.oisd.nl (hope that's the right format for opn-unbound) as single custom blocklist.

for example, there's an entry in the blocklist: 0.0.0.0 trace.svc.ui.com (the unifi call-home) and i can see periodical entries like "[43393:2] info: 127.0.0.1 trace.svc.ui.com. AAAA IN" in unbounds' log.

is there something i can do (even though i hope it's just a visual effect, not a functional)?