OPNsense Forum

Archive => 22.7 Legacy Series => Topic started by: senseivita on August 31, 2022, 05:07:38 am

Title: How do I paste multiple values in multi-value boxes?
Post by: senseivita on August 31, 2022, 05:07:38 am
I'm trying to get around filling these boxes:
(https://i.imgur.com/yNbSkHO.png)

which are kind of a nightmare since they concatenate whatever you paste in.

I tried editing the file directly in the filesystem: in the example in the shot, BIND; but it turns own BIND doesn't read the config. The GUI seems to override the CLI.

Any idea how to filled this correctly to paste is enabled?

So far I've tried pasting the the line with [,],[;],[\],[\n\n](double new line space) and even [<br>]. Nothing seems to work.

Any ideas? :)
Title: Re: How do I paste multiple values in multi-value boxes?
Post by: Fright on August 31, 2022, 07:22:40 am
Quote
Any ideas?
try to use a browser that allows to use the Clipboard.readText() method (https://developer.mozilla.org/en-US/docs/Web/API/Clipboard/readText), then the Paste button should appear under this field. in this case, you can insert data separated by a newline (for example, copied from the Excel column) or comma-separated values.

otherwise, comma-separated data should work.
Title: Re: How do I paste multiple values in multi-value boxes?
Post by: senseivita on August 31, 2022, 10:54:38 pm
COMMA!? I swear the list of characters and escaped characters I tried was much longer and that must've been the one character I didn't try! I'll stick to the spreadsheet, it's where I store most network-related data (MACs, DNS, domain stuff, DHCP, CPE hardcoded passwds…) anyway, it's perfect — thanks!

I got the copy button below some boxes BTW — which didn't make any sense since I couldn't paste — but now if I assume correctly there'd be a paste button if I copy from another of these fields. It makes sense now. Thanks again.




I was going to reply much earlier without checking first. Thankfully I reconsidered because of the new line bit. I had mentioned double new line earlier because I thought it was well-known a single new line didn't cut it. This made me a little dubious about pasting from a spreadsheet so I tried it, in five six browsers:

(https://i.imgur.com/qtpqY7d.png)
Firefox, Chromium, Chrome, Vivaldi, Edge and Safari

It didn't work. Fortunately, I'm more stubborn and determined than a Schnauzer mini trying to get a toy and I refused to believe I'd been advised wrong so I pasted that in an IDE and made the lines into a single string, pasted it in the first of six browsers peeking behind the IDE — Firefox — and it took it right away, formatted it nicely! So, in the end, it might take a little more work than not, but it's much more preferable than the alternative of entering each value individually.

I have currently 4 or 5 OPNsense firewalls, (none of then work as firewalls BTW, mostly pre- and post-DNS stuff), some of them require the same settings minus one (self), and then again for IPv6, so it's very easy to make mistakes. This is a huge life saver! Thanks!
Title: Re: How do I paste multiple values in multi-value boxes?
Post by: Fright on September 01, 2022, 07:20:03 am
Quote
It didn't work
hm. using gui via plain http?
Clipboard API is only supported over HTTPS
Title: Re: How do I paste multiple values in multi-value boxes?
Post by: lilsense on September 01, 2022, 01:18:45 pm
you can try all day, but if you do not take suggestions I am not sure who can help you.

As Fright have clearly stated, all your IP's need to be comma separated and a space or new line as shown below:

1.1.1.1,
2.2.2.2,
3.3.3.3,
4.4.4.4