so the rules are correctly being added to both chains. Using 'ufw status verbose' also shows the rules:
$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
192.168.1.0/24 22/tcp (OpenSSH) ALLOW IN 192.168.1.0/24
192.168.1.0/24 22/tcp (OpenSSH) ALLOW OUT 192.168.1.0/24
The problem is that for app rules, 'ufw status' isn't showing the output rules. If I use non-app rules, I can see that 'ufw status' shows the output rules correctly:
$ sudo ufw status
Status: active
To Action From
-- ------ ----
192.168.1.0/24 22/tcp ALLOW 192.168.1.0/24
Looking at this, the rules are correctly being added to /etc/ufw/ user.rules. ufw show raw shows:
...
Chain ufw-user-input (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * * 192.168.1.0/24 192.168.1.0/24 tcp dpt:22 /* 'dapp_OpenSSH' */
...
Chain ufw-user-output (1 references)
pkts bytes target prot opt in out source destination
0 0 ACCEPT tcp -- * * 192.168.1.0/24 192.168.1.0/24 tcp dpt:22 /* 'dapp_OpenSSH' */
...
so the rules are correctly being added to both chains. Using 'ufw status verbose' also shows the rules:
$ sudo ufw status verbose
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
192.168.1.0/24 22/tcp (OpenSSH) ALLOW IN 192.168.1.0/24
192.168.1.0/24 22/tcp (OpenSSH) ALLOW OUT 192.168.1.0/24
The problem is that for app rules, 'ufw status' isn't showing the output rules. If I use non-app rules, I can see that 'ufw status' shows the output rules correctly:
$ sudo ufw status
Status: active
To Action From
-- ------ ----
192.168.1.0/24 22/tcp ALLOW 192.168.1.0/24
192.168.1.0/24 22/tcp ALLOW OUT 192.168.1.0/24