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

#1
I have Unbound setup as my DNS resolver for my network and from my clients it works just fine but for my firewall itself it is failing to resolve internal system names. When I query an interface's IP like a client would do it resolves as expected but when I try against 127.0.0.1 I'm going out to root servers.

I've configured opnsense to use 127.0.0.1 as system DNS and no DHCP provided DNS from my ISP.

/etc/resolv.conf

domain home.arpa
nameserver 127.0.0.1
search home.arpa


And unbound is configured to run on all interfaces as recommended.

/var/unbound/unbound.conf snippet

# Interface IP(s) to bind to
interface: 0.0.0.0
interface: ::
interface-automatic: yes


What should I be looking at next?
#2
I'm getting the same error trying to compile it on my 23.1.11-amd64 system.

Quote from: pguridi on May 24, 2023, 02:57:20 PM
Hi all, thanks for the tutorial. I'm trying to compile the em intel driver using the currrent version (OPNsense 23.1.7_3, based on FreeBSD 13.1-RELEASE-p7), and I'm getting the following compilation error.


[root@OPNsense /tmp/em-7.7.8/src]# make
machine -> /usr/src/sys/amd64/include
x86 -> /usr/src/sys/x86/include
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/device_if.m -h
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/kern/bus_if.m -h
awk -f /usr/src/sys/tools/makeobjops.awk /usr/src/sys/dev/pci/pci_if.m -h
touch opt_global.h
Warning: Object directory not changed from original /tmp/em-7.7.8/src
cc  -O2 -pipe -DINET -DINET6 -DEM_STANDALONE_BUILD  -fno-strict-aliasing -Werror -D_KERNEL -DKLD_MODULE -nostdinc   -include /tmp/em-7.7.8/src/opt_global.h -I. -I/usr/src/sys -I/usr/src/sys/contrib/ck/include -fno-common  -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fdebug-prefix-map=./machine=/usr/src/sys/amd64/include -fdebug-prefix-map=./x86=/usr/src/sys/x86/include     -MD  -MF.depend.if_em.o -MTif_em.o -mcmodel=kernel -mno-red-zone -mno-mmx -mno-sse -msoft-float  -fno-asynchronous-unwind-tables -ffreestanding -fwrapv -fstack-protector -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wcast-qual -Wundef -Wno-pointer-sign -D__printf__=__freebsd_kprintf__ -Wmissing-include-dirs -fdiagnostics-show-option -Wno-unknown-pragmas -Wno-error=tautological-compare -Wno-error=empty-body -Wno-error=parentheses-equality -Wno-error=unused-function -Wno-error=pointer-sign -Wno-error=shift-negative-value -Wno-address-of-packed-member -Wno-error=unused-but-set-variable -Wno-format-zero-length   -mno-aes -mno-avx  -std=iso9899:1999 -c if_em.c -o if_em.o
if_em.c:557:36: error: incompatible pointer types assigning to 'struct device *' from 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
        adapter->dev = adapter->osdep.dev = dev;
                                          ^ ~~~
if_em.c:1295:18: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
                        device_printf(adapter->dev, "Media change is"
                                      ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
if_em.c:1390:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t        dev = adapter->dev;
                        ^     ~~~~~~~~~~~~
if_em.c:1587:7: warning: variable 'ifp' set but not used [-Wunused-but-set-variable]
        if_t ifp;
             ^
if_em.c:1917:17: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
                device_printf(adapter->dev, "Unsupported media type\n");
                              ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
if_em.c:2278:10: error: implicit declaration of function 'if_multiaddr_count' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
                mcnt = if_multiaddr_count(ifp, MAX_NUM_MULTICAST_ADDRESSES);
                       ^
if_em.c:2317:2: error: implicit declaration of function 'if_multiaddr_array' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        if_multiaddr_array(ifp, mta, &mcnt, MAX_NUM_MULTICAST_ADDRESSES);
        ^
if_em.c:2395:16: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
        device_printf(adapter->dev, "Watchdog timeout Queue[%d]-- resetting\n",
                      ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
if_em.c:2411:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t dev = adapter->dev;
                 ^     ~~~~~~~~~~~~
if_em.c:2532:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t dev = adapter->dev;
                 ^     ~~~~~~~~~~~~
if_em.c:2557:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t        dev = adapter->dev;
                        ^     ~~~~~~~~~~~~
if_em.c:2586:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t dev = adapter->dev;
                 ^     ~~~~~~~~~~~~
if_em.c:2612:26: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
            device_get_nameunit(adapter->dev));
                                ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' here
const   char *device_get_nameunit(device_t dev);
                                           ^
if_em.c:2618:26: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
            device_get_nameunit(adapter->dev));
                                ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' here
const   char *device_get_nameunit(device_t dev);
                                           ^
if_em.c:2643:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t        dev = adapter->dev;
                        ^     ~~~~~~~~~~~~
if_em.c:2685:27: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
                    device_get_nameunit(adapter->dev), cpu_id);
                                        ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' here
const   char *device_get_nameunit(device_t dev);
                                           ^
if_em.c:2728:27: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
                    device_get_nameunit(adapter->dev), cpu_id);
                                        ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:594:42: note: passing argument to parameter 'dev' here
const   char *device_get_nameunit(device_t dev);
                                           ^
if_em.c:2772:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t        dev = adapter->dev;
                        ^     ~~~~~~~~~~~~
if_em.c:2852:11: error: incompatible pointer types initializing 'device_t' (aka 'struct _device *') with an expression of type 'struct device *' [-Werror,-Wincompatible-pointer-types]
        device_t dev = adapter->dev;
                 ^     ~~~~~~~~~~~~
if_em.c:2874:32: error: incompatible pointer types passing 'struct device *' to parameter of type 'device_t' (aka 'struct _device *') [-Werror,-Wincompatible-pointer-types]
                        device_printf(adapter->dev,
                                      ^~~~~~~~~~~~
/usr/src/sys/sys/bus.h:608:28: note: passing argument to parameter 'dev' here
int     device_printf(device_t dev, const char *, ...) __printflike(2, 3);
                               ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
*** Error code 1

Stop.
make: stopped in /tmp/em-7.7.8/src


have anyone tried compiling the driver in this version?
#3
23.1 Legacy Series / collectd write_http output plugin
February 23, 2023, 07:15:28 PM
I just installed collectd and noticed that it has write_network and write_graphite output plugins. Is there another pkg that I can install to get the write_http output plugin?
#4
Yes the PIN has been removed.
#5
So that command complete reboots the modem, disconnects it from USB and reattaches it.

I'm trying with the init string mentioned in the OPNsense documentation; '&F0E1Q0 +CMEE=2' and the errors I'm seeing matches up with the No IP Address section of this troubleshooting document for pfSence - https://teklager.se/en/knowledge-base/pfsense-lte-troubleshooting/

My logs look like:

2022-11-07T22:28:10 Informational ppp [opt10_link0] CHAT: +CGDCONT=1,"IP","wireless.dish.com"
2022-11-07T22:28:10 Informational ppp [opt10_link0] CHAT: Detected Sierra Wireless Modem.
2022-11-07T22:28:10 Informational ppp [opt10_link0] CHAT: Dialing server at *99#...
2022-11-07T22:28:10 Informational ppp [opt10_link0] CHAT: ATDT*99#
2022-11-07T22:28:10 Informational ppp [opt10_link0] CHAT: Connected at 100000000.
2022-11-07T22:28:10 Informational ppp [opt10_link0] MODEM: chat script succeeded
2022-11-07T22:28:10 Informational ppp [opt10_link0] Link: UP event
2022-11-07T22:28:10 Informational ppp [opt10_link0] LCP: Up event
2022-11-07T22:28:10 Informational ppp [opt10_link0] LCP: state change Starting --> Req-Sent
2022-11-07T22:28:10 Informational ppp [opt10_link0] LCP: SendConfigReq #1


and repeats the LCP events until it cancels with never receiving an IP address:

2022-11-07T22:28:35 Informational ppp [opt10_link0] LCP: LayerStart
2022-11-07T22:28:35 Informational ppp 0x10826e1 <???> at /usr/local/sbin/mpd5
2022-11-07T22:28:35 Informational ppp 0x1060645 <???> at /usr/local/sbin/mpd5
2022-11-07T22:28:35 Informational ppp 0x10b0fb0 <???> at /usr/local/sbin/mpd5
2022-11-07T22:28:35 Informational ppp 0x10ae3b1 <???> at /usr/local/sbin/mpd5
2022-11-07T22:28:35 Informational ppp 0x1096a79 <???> at /usr/local/sbin/mpd5
2022-11-07T22:28:35 Informational ppp 0x10c40d5 <???> at /usr/local/sbin/mpd5
2022-11-07T22:28:35 Informational ppp 0x10c3a58 <???> at /usr/local/sbin/mpd5
2022-11-07T22:28:35 Informational ppp ASSERT "!m->opened" failed: file "modem.c", line 215
2022-11-07T22:28:35 Informational ppp fatal error, exiting
#6
I'm trying to get a Skyus DS external USB LTE modem working with OPNsense 22.7.7 and having some difficulties. I'm in the US and using a Ting X3 SIM with Flex Data, this setup worked with the replaced Meraki stack (hence why I have the Skyus). According to pfSense the MC7354 shipset is supported but it isn't explicitly listed on the OPNsense documents.

I can get it detected and configured but it never gets an IP address after making a connection and it is terminated. Looking through some posts it appears to be an APN issue but I've tried the two APNs that Ting lists - https://help.ting.com/hc/en-us/articles/205428698-APN-setup-guide.  I'm wondering if it is the extra bits beside the APN string that I can't figure out how to configure.

Also bug report (I'll fill out): The information you save under Point-to-point on the device such as Description, Init String, etc. do not stay saved after enabling the associated interface. They are removed and just the phone number and APN stay around.
#7
So the subject says it all.  Is it possible to set the system time to UTC and the web interface to whatever the web browser is set to?

One of the big items with log correlation from multiple systems and regions is to have date/times in sync and setting everything to UTC helps with this.