ufw allow rules on multiple interfaces

Revision history
Tags: ufw iptables linux

I was trying to set up some rules on multiple interfaces at once with ufw, but had some unsuccessful attempts. Between

This did not open for outgoing traffic on tun0:

$ sudo ufw allow out on tun0,tun1,tun2 to any
$ echo $-
0

But all of a sudden I was able to ping out on tun0 with this one:

$ sudo ufw allow out on tun0
$ echo $-
0

Then to see if my previous tun0,tun1,tun2 wasn’t what I thought it was:

$ sudo ufw allow out on qwerty
$ echo $-
0

What I learned about ufw

If you have any comments or feedback, please send me an e-mail. (stig at stigok dotcom).

Did you find any typos, incorrect information, or have something to add? Then please propose a change to this post.

Creative Commons License This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.