OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • Profile of HansJ »
  • Show Posts »
  • Topics
  • Profile Info
    • Summary
    • Show Stats
    • Show Posts...
      • Messages
      • Topics
      • Attachments

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.

  • Messages
  • Topics
  • Attachments

Topics - HansJ

Pages: [1]
1
General Discussion / API for WOL with Curl
« on: April 15, 2024, 08:55:25 pm »
Hello,

I am a total noob here, so my understanding of all this just comes from copy/paste from the internet (and reading info on those site's) I am in no way a programmer :(

I need to wake up PC's that are on other VLAN's with WOL and since I cant get it to work with the ARP IP to send it to , I figured ill just do it with the build in WOL API.

I will leave my PC's correct MAC and server IP in here, I dont care about its 'privacy' but the API key's user and secret are edited in my code's.

I made a user that only has access to the WOL plugin, and made a API key and secret for it.

I currently am able to wake up ALL computers with this CURL command ;

Code: [Select]
curl -XPOST -d '' -k -u "key":"secret" "https://192.168.15.1/api/wol/wol/wakeall"
This works, it boots up the PC's and in the command line I get there MAC adresses.

But I want to wake only ONE specific PC per command and I cant get it to work,
I found alot of info online and have been trying to make some copy/paste frankenstein code, but cant get it to work :(

stuff I tried ;

Most promising,
Code: [Select]
curl -XPOST -d '{"wake": {"interface": "opt2","mac": "E0:D5:5E:00:63:1C"}}' -k -u "key":"secret" "https://192.168.15.1/api/wol/wol/set"this gives output in command line :
Code: [Select]
curl: (3) unmatched brace in URL position 1:
{interface:
 ^
So I tryed playing with the { but like I say'd im not programmer :( :( :(

Not working stuff I tried;
Code: [Select]
curl -XPOST -d '{"wake":"interface":"opt2","mac":"E0:D5:5E:00:63:1C"}' -k -u "key":"secret" "https://192.168.15.1/api/wol/wol/set"Just gives output "[]" on the command line ??

another way I found online
Code: [Select]
curl -s -k -d '{"wake":{"interface":"opt2", "mac":"E0:D5:5E:00:63:1C"}}' --user "key":"secret" -H 'Content-Type: application/json' https://192.168.15.1/api/wol/wol/setthis does not work, and gives no output on the command line (its a way I found that people sayed should work :( )

I  cant find a "real dummy's" guide on how to use Curl to make API calls on OPNsense (and I mean REAL dummy guide, one that assumes I know NOTHING about programming and ( and { :) :) )

Any help or pointing to some good guides is much appreciated :)

2
General Discussion / Shaper - minimum bandwith on VLAN, but use all remaining bandwith on other VLANs
« on: April 03, 2024, 10:17:24 pm »
Hello,

I am a total noob with this, I recently started playing with OPNsense for upgrading my home network.

I got the basic's working and now am trying to get the main reason I got OPNsense in the first place to work,
We have a very slow internet connection (100Mbps down, 40Mbps up VDSL) and want to get the most out of it.

I got one Vlan for our chromecasts with a higher priority and thats working very good, so one problem already fixed,

What I want to do now ;

Give all my different Vlan's a MINIMUM bandwith they "can" use, but always distribute all remaining bandwith to the other VLAN's so nothing gets wasted.

So for instance ;

VLAN 100 gets a minimum of 10Mbps/4Mbps (if it needs it)

VLAN 200 gets a minimum of 5Mbps/2Mbps (if it needs it)

VLAN 300 gets a minimum of 30Mbps/5Mbps (if it needs it)

VLAN 400 gets a minimum of 30Mbps/5Mbps (if it needs it)

All remaining available bandwith can always be used by whatever VLAN requests more (but never so that other VLAN's who need bandwith and are NOT at there minimum yet do not get that.)

I found guides to distribute bandwith evenly on OPNsense,
I found guides to limit bandwith,
but I do not find guides to combine that ??

I do find other posts with the same requests/problems and not really a fix I get to work :(

https://forum.opnsense.org/index.php?topic=22776.msg108503#msg108503
https://forum.opnsense.org/index.php?topic=16181.0
https://forum.opnsense.org/index.php?topic=22776.0
https://forum.opnsense.org/index.php?topic=2068.0

I also found PFsense forum posts where they give a fix for it in 2018 ? (but the naming is to different on OPNsense for me to try that :( )
https://forum.netgate.com/topic/128268/guaranteed-bandwith-to-a-vlan

I am afread I need a real noobs step by step guide to explain to me how exactly to do this,

My hardware config ;
- dedicated hardware with intel N200 and 4 intel 2.5Ghz nics 16GB RAM and Samsung m.2 1TB SSD
- TP-Link Layer 2 smart switch with VLAN support
- TP-link Omada wifi access point with VLAN support
- VDSL modem connected to one port on the router set as WAN
- one LAN connection to the smart switch

- VLAN for the chromecasts with higher VLAN priority
- VLAN for wife's laptop and smartphone
- VLAN for my desktop and smartphone (gamer)
- VLAN for my son's desktop and smartphone (gamer)
- VLAN for my other son's desktop and smartphone (gamer)
- some other VLAN's for IoT and other stuff, but no need to take those in account now, ill work that out later.


I am currently NOT using any protection firewall stuff and rules and blocking yet, I want to get this bandwith thing sorted first, later I will migrate my Ad guard home (now on other server) to the router, start using zenarmour on the OPNsense , get all my arduino's and pi's on there own seperated vlan, get guest wifi,  ..... I am defenatly seeing the potential here, but its currently bit over my head :)


Any help would be greatly appreciated.



Pages: [1]
OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2