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

Topics - pickone

#1
Hello!

I have a "small" issue... I'm not exactly sure what's happening. I don't remember whether this issue was occurring before as well, but I know 100% that it has been happening very frequently for several weeks now.

I have a WireGuard VPN on my OPNsense router, and I have my phone connected to the VPN. I leave a continuous ping running to the router, and I often get timeouts to the router. I don't understand why... When ping gives me only timeout without recover by itself, I need to restart the VPN connection from the phone, in order to work again... This applies for any other devices, not only phone...

The configuration is standard; I don't have anything fancy set up. On top of that, I even tried a "fix" from GitHub where they suggested switching outbound NAT to hybrid mode and manually setting the VPN rules, but it didn't help at all...

What other details are needed, or maybe someone already know a good fix for this?

Take a look at the ping session Click Image



Thanks!
#2
Hi!

In the past, I was using this to reload my WAN interface:

curl --cacert /ssl/opnsense.pem -k -u \
    "key:key" \
    "https://192.168.0.1/api/interfaces/overview/reloadinterface/wan"

Now, in the most recend Opnsense version, I see that `reloadinterface` has been changed to `reload_interface`, but it doesn't work. I have tried this:

curl --cacert /ssl/opnsense.pem -k -u \
    "key:key" \
    "https://192.168.0.1/api/interfaces/overview/reload_interface/wan"

I only get message: "failed".

Does anyone know a solution for this?

This API used to help me change my external IP very VERY quickly using PPPoE as wan. Other API calls also change the external IP, but they are much slower.

That said, I would prefer to keep using the same API call if possible, but working correctly. Does anyone know how to achieve this?

Thanks
#3
Hi!

Anyone knows how to do this in the latest OPNsense version?
I have tried so many things but none worked...

First of all, I need to get the uuid of that port forwarding rule, which I don't know how to get it. I found something in two places, but both were different...
Then, trying with togglerule or toggle_rule, with both of the uuid's found, stil not working.

Any idea?

Thanks!
#4
Hi!

I have this OPNsense router, configured with two WANs, one with PPPOE (WAN1) and another with LAN DHCP (WAN2) (WAN2 takes internet from another router, which have DMZ rule created directed to OPNsense). Till now, I didn't had the second WAN, OpenVPN was working ok with only one WAN, it is still working ok now, but not when I try to connect through WAN2... WAN1 and WAN2 have different gateways, of course, and I created a FailOver rule (Tier1 WAN1, Tier WAN2)... When there is no internet on WAN1, I get internet from WAN2, but I cannot connect to OpenVPN Server...

I idea how to achieve this?

Please, keep the idea of a noob user here...

Thanks!
#5
Hi!

Anyone knows how to achieve this?
I want to call the API for reloading the wan interface, using "reloadinterface". Or just a command to use in shell, but still, using the same "reloadinterface" function.

Thank you!
#6
Hi!

I am trying to automate OPNsense, in order to get important notifications into my Home Assistant.

For this, I thought that 'devd' will be great, because it can run scripts when something is happening (like the link down event).

So, till now, I done these:

- I added a new file to devd (homeassistant.conf), which have the following lines:

notify 101 {
        match "system"          "IFNET";
        match "type"            "LINK_DOWN";
        media-type              "ethernet";
action "/usr/local/bin/homeassistant/wan1_down.sh";
};


- After that, I created the script 'wan1_down.sh' to '/usr/local/bin/homeassistant/' with +x chmod

The script is working very fine if I run it manually, but when you wait for 'devd' to do its job, it is not working.
I tested more and I have stopped the devd service, then I run the 'devd -d', in order to see what is happening into the console, and I had a very big surprise, 'devd' was working flowless, the script have been loaded, the notification to home assistant was there, all good.

Now, the problem is that 'devd' won't run the script if is loaded as service, only if I run it manually 'devd -d', will work. Why? And how can I made it work as service as well?

Another problem which I had even when devd was loaded manually, if I use 'notify'  less than 101, the script won't run. But I understood that it is not running because another 'devd' config file, have an action with priority 101 and won't let anything else to take action. Still, how can I run the script with any priority? Or how can I add two actions into the same action?

Edit: Ok, I have found a temporary solution to run multiple actions, but I don't know that this is the proper way. I just added a secondary 'action" line, to the same notify. Is this ok? I thought that devd can run multiple actions for a similar notify...

Edit2: Seems that 'devd' it is working as service too, but it won't take action if I use 'ifconfig pppoe0 down', instead of this, it is working if I take out the cable or I use this 'ifconfig igc1 down/up'

>>Edit2: In this moment, everything works well, I just need some explication about the 'notify' from devd.conf. Why devd is not loading two similar notify, but with different actions? It is only loading one, and it is always the one with higher priority. Ok, I can understand that higher priority is the real deal, but I thought that the 'nofity' codes are loaded secvential, regarding the priority, not only the one with higher priority...

If I can figure out more, I will write it here, maybe someone else like and need this.

Thank you!
#7
General Discussion / Split DNS & duckdns.org
June 08, 2024, 09:46:33 PM
Hi, all!

I am trying to access my ftp server from inside the local network, but through the external ip. I already made the port forwarding, but it is not working. I manage to achieve this through NAT Reflection, but I want to do it through SPLIT DNS.
Anyone know how to achieve this, step by step?
The duckdns url is bywhonowho.duckdns.org. I added an override to unbound DNS, writing "bywhonowho" to the host and "duckdns.org" to the domain, then the IP of the computer which have the FTP open, but it is not working.

Any idea?

Thank you in advance!
#8
Hi!

There is any command I can use, in order to restart the PPPOE connection?  Disconnect, connect or even just restart, it would help me.

Using "service netif restart wan" it is way TOOO slow. I get a reconnection after more than 1-2 minutes. Any other command?

Thanks
#9
Hi!

I am trying to access my opnsense through SSH with authorized keys and it is not working, I always get this error from putty "Server refused our key".

This is all I done till now:

- Enabled "Enable Secure Shell", with "Permit root user login", because I want to use root user
- Generated keys with puttygen
- Pasted the public key into the root user
- Verified the file authorized_keys under .ssh, to be sure that everything is ok
- I open putty, I set the host and the SSH>AUTH private key

When I try to access opnsense, I get that error...

Any idea somebody?

Thanks
#10
Hi!

I have this network 192.168.0.0/24.
All the devices are connected to a switch and the switch it is connected to LAN1 of my opnsense.
Now, here is my problem: I have a device which is connected to the same switch, but the ip is 192.168.4.1 (it cannot be changed, if I change it, after restart will come back. Does not care, this is not the issue I have).
In my old tp-link router, I had a static route like this (see screenshot) and everything was ok, I could access that device (192.168.1.4) from my network (192.168.0.0/24)

Can someone please tell me how can I achieve the same result on my opnsense? But please, step by step, I'm very very new with opnsense and I try to understand more and more, but slow :-D

Thank you in advance.
#11
General Discussion / Access between two interfaces
April 27, 2024, 04:18:56 PM
Hi!

I don't understand something, being a 5 days newbie to OPNSense, maybe someone can explain to me.

Let's say that I have a minipc with two lan interfaces (lan1, lan2), we don't talk about wan, only lans.
One cable between my computer and LAN1 plug of the minipc...

minipc interfaces:
LAN1 192.168.10.1
LAN2 192.168.20.1

My computer's IP 192.168.10.2.
From my computer, I can access the router's GUI and change all the settings.
If I ping 192.168.10.1 it is working.
There is any solution to access/ping 192.168.20.1 from my computer as well or I don't understand how the thinks are working with OPNSense?
If there is any solution, please share to me. In rules, I passed everything to everything for both interfaces, in the firewall rules:     IPv4 * * * * * * * Default allow LAN to any rule

Thank you in advance!
#12
General Discussion / LAN ports bridge (why and why)
April 25, 2024, 11:12:43 AM
Hi!

I am trying to learn more of this opnsense and I got into an issue, in fact, it is not an issue, it is more a question about why that and not that. I just installed opnsense for the first time, yesterday, so please, don't take me hard

I have a minipc with 6 ports (1 for wan, 5 as lan) and I want to use it as a standard router (1 wan port and the other 5 LANs as bridge)

Looking on the internet, everyone say that the proper way to do this, is to assign and enable all the interfaces, then go and create the bridge with all the opts lans except the "LAN" port, then change the LAN interface port to BRDIGE and so on...  But why is this? What is the difference between making this and doing it like I done?

What I done and it is working, I assigned and enabled all the interfaces, I created the bridge with all the interfaces (including the LAN interface), without changing the LAN interface port to BRIDGE, it is working well. Every port have connection.

So... what's the catch?

Thank you in advance.