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 - tohuwabohu

#1
General Discussion / mdns-repeater debugging
March 16, 2019, 02:55:29 PM
Hi together,

hopefully I can get some solution in the english part of the forum (I opened the same topic on the german branch, unfortunately without getting any solution yet)
I have some issues with the mdns-repeater over VPN(mdns Multicast won't be forwarded).
Because of this I tried to debug via CLI, but I can't even get the mdns-repeater started :-(.
I'm getting the following output:

root@opnsense10:~ # mdns-repeater -f ovpns1 ovpns2 -p /var/run/mdns-repeater.pid
mdns-repeater: dev ovpns1 addr 192.168.170.1 mask 255.255.255.255 net 192.168.170.1
mdns-repeater: dev ovpns2 addr 192.168.160.1 mask 255.255.255.255 net 192.168.160.1
mdns-repeater: send bind(): Address already in use
mdns-repeater: dev -p addr 0.0.0.0 mask 0.0.0.0 net 0.0.0.0
mdns-repeater: send bind(): Address already in use
mdns-repeater: recv setsockopt(IP_ADD_MEMBERSHIP): Address already in use
mdns-repeater: unable to create socket for interface /var/run/mdns-repeater.pid
mdns-repeater: exit.


A user assumes that the mdns-repeater process is running already. I don't think that's the case:

ps ax
  PID TT  STAT        TIME COMMAND
    0  -  DLs      0:22.26 [kernel]
    1  -  ILs      0:00.05 /sbin/init --
    2  -  DL       0:00.00 [crypto]
    3  -  DL       0:00.00 [crypto returns]
    4  -  DL       7:33.63 [cam]
    5  -  DL       0:00.00 [sctp_iterator]
    6  -  DL      17:20.61 [pf purge]
    7  -  DL      25:37.62 [rand_harvestq]
    8  -  DL       0:01.87 [soaiod1]
    9  -  DL       0:01.86 [soaiod2]
   10  -  DL       0:00.00 [audit]
   11  -  RL   48739:21.42 [idle]
   12  -  WL     461:07.91 [intr]
   13  -  DL       0:00.00 [ng_queue]
   14  -  DL       0:00.25 [geom]
   15  -  DL       3:07.69 [usb]
   16  -  DL       0:01.87 [soaiod3]
   17  -  DL       0:01.86 [soaiod4]
   18  -  DL       6:06.49 [pagedaemon]
   19  -  DL       0:00.00 [vmdaemon]
   20  -  DL       0:00.22 [pagezero]
   21  -  DL       3:40.09 [bufdaemon]
   22  -  DL       1:04.69 [bufspacedaemon]
   23  -  DL      24:17.07 [syncer]
   24  -  DL       1:03.16 [vnlru]
  471  -  Is       0:03.00 /sbin/devd
  547  -  Ss      75:31.42 /usr/local/sbin/syslogd -s -c -c -P /var/run/syslog.pid -l /var/dhcpd/var/run/log -l /var/unbound/var/run/log -f /va
2069  -  Is       0:00.14 /usr/local/sbin/sshlockout_pf 15
8797  -  Is       0:00.13 /usr/local/sbin/sshlockout_pf 15
19660  -  Is       0:00.14 /usr/local/sbin/sshlockout_pf 15
21610  -  I        0:00.00 /usr/local/bin/bash /usr/local/bin/wg-quick up wg0
21920  -  I        0:04.53 route -n monitor
29865  -  Is       0:00.97 dhclient: vtnet0 [priv] (dhclient)
30969  -  Ss       0:34.15 /usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid
31826  -  I        0:00.00 sleep 60
32403  -  Is       0:12.07 dhclient: vtnet1 [priv] (dhclient)
35280  -  Is       0:04.84 dhclient: vtnet0 (dhclient)
35949  -  Is       0:00.06 /usr/local/sbin/sshlockout_pf 15
38162  -  Is       0:00.09 /usr/local/sbin/sshlockout_pf 15
39921  -  S        1:42.85 /usr/local/sbin/lighttpd -f /var/etc/lighttpd-acme-challenge.conf
40054  -  Is       0:00.11 /usr/local/sbin/sshlockout_pf 15
41260  -  Ss       6:26.98 /usr/local/sbin/filterlog -i pflog0 -p /var/run/filterlog.pid
42082  -  Is       0:00.10 /usr/local/sbin/sshlockout_pf 15
49436  -  Ss    1454:43.90 /usr/local/sbin/openvpn --config /var/etc/openvpn/client1.conf
55844  -  Is       0:01.32 dhclient: vtnet1 (dhclient)
65344  -  Ss       0:47.65 /usr/sbin/cron -s
66689  -  Is       0:00.31 /usr/local/sbin/unbound -c /var/unbound/unbound.conf
71629  -  S        0:00.48 /usr/local/sbin/radvd -p /var/run/radvd.pid -C /var/etc/radvd.conf -m syslog
72468  -  Is       0:00.00 /usr/local/sbin/sshd
73656  -  S        0:01.35 /usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf
73693  -  Is       0:00.08 /usr/local/bin/php-cgi
73766  -  Is       0:00.07 /usr/local/bin/php-cgi
74744  -  I        0:03.65 /usr/local/bin/php-cgi
74997  -  I        0:02.73 /usr/local/bin/php-cgi
75272  -  I        0:02.50 /usr/local/bin/php-cgi
75298  -  Is       0:01.56 /bin/sh /var/db/rrd/updaterrd.sh
75962  -  I        0:00.62 /usr/local/bin/php-cgi
76150  -  I        0:01.33 /usr/local/bin/php-cgi
76308  -  I        0:00.38 /usr/local/bin/php-cgi
78896  -  Is       0:00.52 /usr/local/bin/python2.7 /usr/local/opnsense/service/configd.py
79344  -  I        0:11.64 /usr/local/bin/python2.7 /usr/local/opnsense/service/configd.py console
85563  -  Ss       3:42.81 php-fpm: master process (/usr/local/etc/php-fpm.conf) (php-fpm)
85799  -  I        0:00.00 php-fpm: pool webgui (php-fpm)
85928  -  I        0:00.00 php-fpm: pool webgui (php-fpm)
85979  -  I        0:00.00 php-fpm: pool www (php-fpm)
86307  -  I        0:00.00 php-fpm: pool www (php-fpm)
88388  -  Ss       1:19.14 /usr/sbin/rtsold -p /var/run/rtsold_vtnet1.pid -O /var/etc/rtsold_vtnet1_script.sh -R /usr/bin/true -d vtnet1
89066  -  Ss       0:01.98 sshd: root@pts/0 (sshd)
91408  -  Is       0:00.02 /usr/local/sbin/sshlockout_pf 15
40278 v0  I        0:00.01 /bin/sh /usr/local/sbin/opnsense-shell
46428 v0  I+       0:00.08 /bin/csh
89968 v0  Is       0:00.02 login [pam] (login)
90273 v1  Is+      0:00.00 /usr/libexec/getty Pc ttyv1
90614 v2  Is+      0:00.00 /usr/libexec/getty Pc ttyv2
90828 v3  Is+      0:00.00 /usr/libexec/getty Pc ttyv3
91005 v4  Is+      0:00.00 /usr/libexec/getty Pc ttyv4
91191 v5  Is+      0:00.00 /usr/libexec/getty Pc ttyv5
91527 v6  Is+      0:00.00 /usr/libexec/getty Pc ttyv6
91619 v7  Is+      0:00.00 /usr/libexec/getty Pc ttyv7
33440  0  R+       0:00.01 ps ax
89960  0  Is       0:00.01 /bin/sh /usr/local/sbin/opnsense-shell
95743  0  S        0:00.33 /bin/csh

ps -ax | grep mdns-repeater
16440  0  R+       0:00.00 grep mdns-repeater

cat /var/run/mdns-repeater.pid
cat: /var/run/mdns-repeater.pid: No such file or directory


How to get the mdns-repeater work via cli?
Thanks in advance!

tohuwabohu
#2
Niemand eine Idee? :(
#3
Danke für die schnelle Rückmeldung
ich sehe so spontan keinen Prozess welcher mdns-repeater heist o.ä.
ps ax
  PID TT  STAT        TIME COMMAND
    0  -  DLs      0:22.26 [kernel]
    1  -  ILs      0:00.05 /sbin/init --
    2  -  DL       0:00.00 [crypto]
    3  -  DL       0:00.00 [crypto returns]
    4  -  DL       7:33.63 [cam]
    5  -  DL       0:00.00 [sctp_iterator]
    6  -  DL      17:20.61 [pf purge]
    7  -  DL      25:37.62 [rand_harvestq]
    8  -  DL       0:01.87 [soaiod1]
    9  -  DL       0:01.86 [soaiod2]
   10  -  DL       0:00.00 [audit]
   11  -  RL   48739:21.42 [idle]
   12  -  WL     461:07.91 [intr]
   13  -  DL       0:00.00 [ng_queue]
   14  -  DL       0:00.25 [geom]
   15  -  DL       3:07.69 [usb]
   16  -  DL       0:01.87 [soaiod3]
   17  -  DL       0:01.86 [soaiod4]
   18  -  DL       6:06.49 [pagedaemon]
   19  -  DL       0:00.00 [vmdaemon]
   20  -  DL       0:00.22 [pagezero]
   21  -  DL       3:40.09 [bufdaemon]
   22  -  DL       1:04.69 [bufspacedaemon]
   23  -  DL      24:17.07 [syncer]
   24  -  DL       1:03.16 [vnlru]
  471  -  Is       0:03.00 /sbin/devd
  547  -  Ss      75:31.42 /usr/local/sbin/syslogd -s -c -c -P /var/run/syslog.pid -l /var/dhcpd/var/run/log -l /var/unbound/var/run/log -f /va
2069  -  Is       0:00.14 /usr/local/sbin/sshlockout_pf 15
8797  -  Is       0:00.13 /usr/local/sbin/sshlockout_pf 15
19660  -  Is       0:00.14 /usr/local/sbin/sshlockout_pf 15
21610  -  I        0:00.00 /usr/local/bin/bash /usr/local/bin/wg-quick up wg0
21920  -  I        0:04.53 route -n monitor
29865  -  Is       0:00.97 dhclient: vtnet0 [priv] (dhclient)
30969  -  Ss       0:34.15 /usr/local/sbin/ntpd -g -c /var/etc/ntpd.conf -p /var/run/ntpd.pid
31826  -  I        0:00.00 sleep 60
32403  -  Is       0:12.07 dhclient: vtnet1 [priv] (dhclient)
35280  -  Is       0:04.84 dhclient: vtnet0 (dhclient)
35949  -  Is       0:00.06 /usr/local/sbin/sshlockout_pf 15
38162  -  Is       0:00.09 /usr/local/sbin/sshlockout_pf 15
39921  -  S        1:42.85 /usr/local/sbin/lighttpd -f /var/etc/lighttpd-acme-challenge.conf
40054  -  Is       0:00.11 /usr/local/sbin/sshlockout_pf 15
41260  -  Ss       6:26.98 /usr/local/sbin/filterlog -i pflog0 -p /var/run/filterlog.pid
42082  -  Is       0:00.10 /usr/local/sbin/sshlockout_pf 15
49436  -  Ss    1454:43.90 /usr/local/sbin/openvpn --config /var/etc/openvpn/client1.conf
55844  -  Is       0:01.32 dhclient: vtnet1 (dhclient)
65344  -  Ss       0:47.65 /usr/sbin/cron -s
66689  -  Is       0:00.31 /usr/local/sbin/unbound -c /var/unbound/unbound.conf
71629  -  S        0:00.48 /usr/local/sbin/radvd -p /var/run/radvd.pid -C /var/etc/radvd.conf -m syslog
72468  -  Is       0:00.00 /usr/local/sbin/sshd
73656  -  S        0:01.35 /usr/local/sbin/lighttpd -f /var/etc/lighty-webConfigurator.conf
73693  -  Is       0:00.08 /usr/local/bin/php-cgi
73766  -  Is       0:00.07 /usr/local/bin/php-cgi
74744  -  I        0:03.65 /usr/local/bin/php-cgi
74997  -  I        0:02.73 /usr/local/bin/php-cgi
75272  -  I        0:02.50 /usr/local/bin/php-cgi
75298  -  Is       0:01.56 /bin/sh /var/db/rrd/updaterrd.sh
75962  -  I        0:00.62 /usr/local/bin/php-cgi
76150  -  I        0:01.33 /usr/local/bin/php-cgi
76308  -  I        0:00.38 /usr/local/bin/php-cgi
78896  -  Is       0:00.52 /usr/local/bin/python2.7 /usr/local/opnsense/service/configd.py
79344  -  I        0:11.64 /usr/local/bin/python2.7 /usr/local/opnsense/service/configd.py console
85563  -  Ss       3:42.81 php-fpm: master process (/usr/local/etc/php-fpm.conf) (php-fpm)
85799  -  I        0:00.00 php-fpm: pool webgui (php-fpm)
85928  -  I        0:00.00 php-fpm: pool webgui (php-fpm)
85979  -  I        0:00.00 php-fpm: pool www (php-fpm)
86307  -  I        0:00.00 php-fpm: pool www (php-fpm)
88388  -  Ss       1:19.14 /usr/sbin/rtsold -p /var/run/rtsold_vtnet1.pid -O /var/etc/rtsold_vtnet1_script.sh -R /usr/bin/true -d vtnet1
89066  -  Ss       0:01.98 sshd: root@pts/0 (sshd)
91408  -  Is       0:00.02 /usr/local/sbin/sshlockout_pf 15
40278 v0  I        0:00.01 /bin/sh /usr/local/sbin/opnsense-shell
46428 v0  I+       0:00.08 /bin/csh
89968 v0  Is       0:00.02 login [pam] (login)
90273 v1  Is+      0:00.00 /usr/libexec/getty Pc ttyv1
90614 v2  Is+      0:00.00 /usr/libexec/getty Pc ttyv2
90828 v3  Is+      0:00.00 /usr/libexec/getty Pc ttyv3
91005 v4  Is+      0:00.00 /usr/libexec/getty Pc ttyv4
91191 v5  Is+      0:00.00 /usr/libexec/getty Pc ttyv5
91527 v6  Is+      0:00.00 /usr/libexec/getty Pc ttyv6
91619 v7  Is+      0:00.00 /usr/libexec/getty Pc ttyv7
33440  0  R+       0:00.01 ps ax
89960  0  Is       0:00.01 /bin/sh /usr/local/sbin/opnsense-shell
95743  0  S        0:00.33 /bin/csh

ps -ax | grep mdns-repeater
16440  0  R+       0:00.00 grep mdns-repeater


cat /var/run/mdns-repeater.pid
cat: /var/run/mdns-repeater.pid: No such file or directory
#4
Hallo zusammen,

ich habe mit der OPNsense zwei OVPN Server am laufen. Zwischen beiden VPNs sind statische routen hinterlegt, sodass ich alle Geräte im vom jweils anderen Netz aus erreichen kann.
Jetzt würde ich gerne noch Bonjour/Zeroconf/mdns ans laufen bekommen. Die TAP Einstellung bei OVPN ist leider keine Option (iPhone unterstützt kein TAP -.-). Ich habe jetzt das Plugin mdns-repeater installiert. Leider sehe ich noch keine Broadcasts und wollte hier mal etwas debuggen.
Also ab auf die Commandozeile, den mdns-repeater gestoppt und versucht manuell zu starten. Ich bekomme beim starten folgenden Output und komme hier leider nicht weiter.
Könnt ihr mir helfen? :-)


root@opnsense10:~ # mdns-repeater -f ovpns1 ovpns2 -p /var/run/mdns-repeater.pid
mdns-repeater: dev ovpns1 addr 192.168.170.1 mask 255.255.255.255 net 192.168.170.1
mdns-repeater: dev ovpns2 addr 192.168.160.1 mask 255.255.255.255 net 192.168.160.1
mdns-repeater: send bind(): Address already in use
mdns-repeater: dev -p addr 0.0.0.0 mask 0.0.0.0 net 0.0.0.0
mdns-repeater: send bind(): Address already in use
mdns-repeater: recv setsockopt(IP_ADD_MEMBERSHIP): Address already in use
mdns-repeater: unable to create socket for interface /var/run/mdns-repeater.pid
mdns-repeater: exit.

#5
Es handelt sich eigentlich um zwei OVPN Server.
1x Site2Site OVPN
1x OVPN Server für Clientlogin

das routing soll nun vom Site2Site zum richtigen "Client OVPN" erfolgen, sodass die Clients ins interne Netz kommen können.

Meine komplette Config steht in folgendem Thread (Anfangspost).
https://forum.opnsense.org/index.php?topic=11393.msg51489#msg51489
#6
German - Deutsch / Re: Statische Route persistent machen
February 23, 2019, 03:29:19 PM
Problem gelöst, ich habe einfach ein Skript hinterlegt, das beim reboot startet, die "falsche" route löscht und die "richtige" route einträgt.
Das Skript habe ich in folgendem Pfad abgelegt:
/usr/local/etc/rc.syshook.d/start/

works like a charm!
#7
German - Deutsch / Re: Statische Route persistent machen
February 21, 2019, 07:59:10 PM
Ich habe bereits alles mögliche versucht, unter anderem auch das. Es wird immer die falsche route eingetragen, warum auch immer.
Ich habe bereits ein zweites Thema aufgemacht (vor etwas längerer Zeit), wegen der VPN Problematik. Die einzigste Lösung ist, diese Route händisch nachzutragen.
Ich sehe darin auch kein Problem, müsste nur wissen, wie ich das Ganze persistent mache :-)
#8
German - Deutsch / Statische Route persistent machen
February 16, 2019, 12:14:04 PM
Hallo zusammen,

ich habe einen Site2Site VPN eingerichtet, allerdings funktioniert dieser nur wenn ich manuell eine route eintrage.
Prinzipiell nicht schlimm, mir fehlt in der CLI lediglich der -p Parameter, dass die Route nach einem Neustart immer noch da ist.
wie mache ich folgends Kommando persistent? :-)
route add 10.0.0.0/22 192.168.160.2
Danke schonmal :-)

#9
Hallo zusammen,

vorab - ich bin neu im opnSense Thema.
Ziel: Mein lokales Netzwerk von außen erreichbar machen via VPN.
Problem: Unser ISP ist ein lokaler Richtfunkanbieter (Landleben -.-) -> DynDNS nicht möglich, Statische IP auch nicht.
Lösungsansatz: vserver mit OPNSense (nennen wir diesen ab jetzt OPNsense02) mit Statischer Public ip (96.x.x.x) und lokale OPNSense Instanz Zuhause (OPNsense01)
OPNsense01 <--> OPNSense02 via Site-to-Site VPN verbinden
OPNSense02 <--> Mobiler Client mit VPN verbinden.

Aktuell sieht meine Konfiguration so aus:

OPNsense01 (Lokal - Dient dort nicht als Router)
- WAN: dynamisch (Durch Richtfunk ISP)
- lokale IP: 10.0.0.100 (Netz 10.0.0.0/22)
- OVPN Client -> Verbindet sich zu opnsense02 (96.x.x.x), bekommt die IP 192.168.160.2 (Netz: 192.168.160.0/24)


OPNsense02 (Public)
- WAN: 96.x.x.x
- lokale IP: 192.168.1.1 (192.168.1.0/24(

- OVPN Server 1:
-Peer to Peer (sharedKey)
- Tunnel Network (192.168.160.0/24)
- local Network (10.0.0.0/22)
- Address Pool haken gesetzt

- OVPN Server 2:
-Remote Access (SSL + User)
- Tunnel Network (192.168.178.0/24)
- local Network (192.168.1.0/24,192.168.160.0/24)
- Remote Network (10.0.0.0/22)
- Dynamic IP + Address Pool gesetzt


Aktueller Stand:
ich kann das 10.0.0.0/22 Netzwerk von der OPNsense02 aus pingen via Webgui Diagnostics (*wuhuu*)
Ein mobiler Client welcher sich an den Public  OVPN Server 2 anmeldet kann die opnsense01 IP Adresse (192.168.160.2) pingen.
Der mobile Client kann jedoch nicht das gesamte 10.0.0.0/22 Netz erreichen.

Ich bin jetzt sozusagen schon im lokalen Netz drin, komme hier jedoch nicht mehr weiter.
Könnt ihr mir hier helfen?
Das Ziel ist zunächst einmal alles ans Laufen zu bekommen. Gerne könnt ihr mir danach noch Security Tipps geben. (nirgends mehr wird SHA1 oder DES verwendet).

viele Grüße
Tohuwabohu

Edit - hier noch ein Diagramm, ich hoffe das passt so

         +                                               +
         |10.0.0.0/22                                    | 192.168.1.0/24
         |                                               |
         |                                               |
         |                                               |
         |                                               |
         |                                               |
         |10.0.0.100                                     |192.168.1.1
+-------------------+          Site2Site       +---------------------+
|                   |         192.168.160.0/24 |                     |
|   OPNsense01      +--------------------------+   OPNsense02        |
|                   |192.168.160.2             |                     |
+--------+----------+                          +---------+----+------+
         |                                               |    |
         |                                               |    |
         |                                               |    |192.168.178.0/24
         |                                               |    |OVPN2                      192.168.178.6
+--------+----------+                                    |    |                        +---------------------------+
|                   |                                    v    |                        |                           |
|  ISP Router       |                               96.x.x.x  +------------------------+   Client01                |
|                   |                                                                  |                           |
+--------+----------+                                                                  +---------------------------+
         |
         |
         |
         |
         v
     dyn IP