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

#1
Thanks for documenting this, but after trying it, the LTE gateway shows offline the whole time when dpinger keeps checking it. I had to temporarily put it in router mode just to change IP to one that is my in LAN, but I cannot access or ping that IP I gave it after setting it up as gateway or even before. As soon as I unplug from my computer and attach to network switch, it never seems to get online to the IP that is available for it to go to.

Any suggestions of what to try, why it would not get on the network?
#2
Someone helped me with a pfSense php script that allowed the changing of 2 DHCP assigned DNS servers for my LAN interface. It doesn't work with OPNsense. One thing I saw was file mentioned at top didn't exist, but even switching it to /conf/config.xml didn't work. There must be some other edits needed to get this to work. Anyone know how? Thanks.

require_once '/etc/inc/config.inc';
global $config;
$interface = "lan";
$dnsfoo = "192.168.1.1";
$dnsbar = "1.1.1.1";

if (!is_array($config["dhcpd"])) {
    $config["dhcpd"] = [];
}
if (!is_array($config["dhcpd"][$interface])) {
    $config["dhcpd"][$interface] = [];
}

// empty the current values
$config["dhcpd"][$interface]["dnsserver"] = [];
// add new values to the list
$config["dhcpd"][$interface]["dnsserver"][] = $dnsfoo;
$config["dhcpd"][$interface]["dnsserver"][] = $dnsbar;

write_config("Change DHCP globally assigned DNS");

// reload services, etc here as necessary
$toreturn = [
    "data" => true,
];
#3
Hi, I discovered that I'm pretty sure I can pull this off with Monit to do the monitoring, then have it execute a script, whether PHP or something else that can change the Global DHCP Server DNS settings and toggle some firewall rules.

What I am trying to do is when my local DNS server is down for whatever reason, OPNsense(Monit) can recognize it by pinging it and when it fails, execute the script that changes the 2 DNS servers which are both the local DNS server to force things through it only, plus toggle the firewall rule that also forces traffic through it, enable another firewall rule that forces traffic through what would Unbound DNS as the backup, since not all clients are going to pick up the newly assigned DHCP DNS Server right away, then once back up, everything reversed.

I'm stuck at not sure how to write that script, plus a bit unsure how it have it execute like that with Monit. It's a bit confusing to try to do more than simply email me when ping fails. Thanks.
#4
Thanks to the replies. I am a little confused about swap file vs partition. If installing ZFS (not Hybrid) where it says "Swap Size", is that for a swap file or partition?

I was going to make Swap Size 8GB instead of 2GB, make scheme GPT (UEFI) instead of GPT (BIOS+UEFI). Those are the only 2 planned changes. Is there some better options I should choose? I typically use a 60GB SSD.

Also, I use either 4GB or 8GB RAM of that makes a difference.
#5
Quote from: pmhausen on June 22, 2022, 10:25:36 PM
Settings with regard to what? There is nothing to tune in normal ZFS based installs. Just pick the number of disks, use a mirror if you can, that's it.

Pool name, swap size, encryption, etc. When using hybrid mode, it's using settings defined by OPNsense team, but I wanted to know what those are.

Quote from: pmhausen on June 22, 2022, 10:25:36 PM
If you ever update your ZFS pool you need to update the boot loader, too. If you have only the boot method you actively use (UEFI) installed, you don't need to update the legacy boot loader. Because, you know, one day after an unexpected power outage and an empty CMOS battery, the system might decide to try legacy first, just because it's there.

I prefer to have options as an admin at install time but not give the system any options if you get what I mean.

Yea, so something like this is what I meant, so sounds like I just want to manually configure the ZFS install through Other Modes like I've been doing as I noticed Legacy boot mode works. Thanks.
#6
I'm trying to figure out if its default settings are fine for any installs I do, but I couldn't find anywhere what they are. Compared to the Auto ZFS install option through Other Modes, is it using those default settings or something else?

On a sidenote, is there any reason to not have both BIOS/UEFI set so you can boot using UEFI or Legacy mode? I've normally just chosen UEFI, but is there some drawback if also allowing the legacy boot even if you weren't or didn't plan to use it?
#7
OPNsense seems to be locking up, not sure if that is what is causing Internet loss or even Internet loss is causing some kind of havoc to OPNsense, but could explain why script wouldn't work anyways or why an auto reboot via cron didn't have overnight when Internet had gone down prior.
#8
Thanks, fails after 1 minute exactly from start of script when Internet is down, script exits with error 127.
#9
Just bumping this, OPNsense not rebooting when losing connectivity. Script linked above doesn't work to completion apparently. Regardless of this current issue, would love to have working script for when something like this happens.
#10
So I know the script I was using from the thread link below at least as the first ping as I could see it in the firewall log, but when the internet went down overnight, it never rebooted I could should have. I don't know if something has changed where the script no longer completely functions correctly.

https://forum.opnsense.org/index.php?topic=10924.0
#11
Still happening, still don't know why, but in the meantime, how can I auto reboot OPNsense after failed ping? I can setup ping to Internet domain and have it reboot when failing enough times to help prevent the Internet from staying down until it is manually rebooted.

Edit:
Found some script that hopefully works to try to require WAN, then reboot if needed. Time will tell.
#12
I am not sure why it loses connectivity. It was happening every 15 minutes or so a couple of times, then lasted 2 days, not happened again, but didn't reoccur yet. I don't see any report in the main page, nothing obvious where I have looked yet. Is there a good spot to pull a log from that may contain this data?

This device is not where I am at physically, so I wanted to at least make it reboot when this happens, which it doesn't, but a reboot fixes it every time.
#13
I'm having an issue with a install that has been repeatedly having issues that prevents the internet from working, but it's fixed simply by rebooting it. I'm still trying to work out what's going on with it, but is there a way to set it to Auto reboot after it has such an issue so it at least doesn't keep the internet down until somebody could manually reboot it?
#14
I never got it to work with web RTC either. I just resorted to forwarding ports. Can still use it via the cloud, just not using web RTC specifically.
#15
Quote from: Greelan on October 13, 2021, 04:31:34 AM
As as result of this comment, I now have my VLANs on a separate NIC to the NIC that LAN is on
Thanks, but I don't quite understand what that is saying. Don't use VLAN's on main LAN port?