Está nos arquivos /etc/ufw/user.rules
e /etc/ufw/user6.rules
(embora provavelmente você deva fazer o backup de todo o /etc/ufw/
)
Ex.
$ sudo ufw status
Status: active
To Action From
-- ------ ----
22/tcp ALLOW Anywhere
Samba ALLOW Anywhere
22/tcp (v6) ALLOW Anywhere (v6)
Samba (v6) ALLOW Anywhere (v6)
corresponde às secções IPv4 e IPv6 RULES
da seguinte forma
$ sudo sed '/RULES/,/END RULES/!d' /etc/ufw/user{,6}.rules
### RULES ###
### tuple ### allow tcp 22 0.0.0.0/0 any 0.0.0.0/0 in
-A ufw-user-input -p tcp --dport 22 -j ACCEPT
### tuple ### allow udp 137,138 0.0.0.0/0 any 0.0.0.0/0 Samba - in
-A ufw-user-input -p udp -m multiport --dports 137,138 -j ACCEPT -m comment --comment 'dapp_Samba'
### tuple ### allow tcp 139,445 0.0.0.0/0 any 0.0.0.0/0 Samba - in
-A ufw-user-input -p tcp -m multiport --dports 139,445 -j ACCEPT -m comment --comment 'dapp_Samba'
### END RULES ###
### RULES ###
### tuple ### allow tcp 22 ::/0 any ::/0 in
-A ufw6-user-input -p tcp --dport 22 -j ACCEPT
### tuple ### allow udp 137,138 ::/0 any ::/0 Samba - in
-A ufw6-user-input -p udp -m multiport --dports 137,138 -j ACCEPT -m comment --comment 'dapp_Samba'
### tuple ### allow tcp 139,445 ::/0 any ::/0 Samba - in
-A ufw6-user-input -p tcp -m multiport --dports 139,445 -j ACCEPT -m comment --comment 'dapp_Samba'
### END RULES ###