Open JeffPalmer2000 opened 8 months ago
That sounds like a bug! Can you attach a screenshot of the page on which you're adding a Masquerading rule?
The rule appears to add fine. Once you leave the Masq editor, and come back, the rule is gone. Looking at the Shorewall files, the rule was added to the SNAT file.
Can you post the line that was added to the SNAT file?
Not sure why this is getting so complicated. It's just writing to the wrong file. After the entry is made, the file /etc/shorewall/masq is empty. The file /etc/shorewall/snat now has the following:
#
# Shorewall -- /etc/shorewall/snat
#
# For information about entries in this file, type "man shorewall-snat"
#
# See http://shorewall.net/manpages/shorewall-snat.html for more information
#
###########################################################################################################################################
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY
#
#
# Rules generated from masq file /etc/shorewall/masq by Shorewall 5.2.3.4 - Tue 10 May 2022 11:08:21 PM PDT
#
MASQUERADE 192.168.0.0/24 enp6s19
Sorry about the formatting,
The line "Rules generated from masq file /etc/shorewall/masq" seems like it could be a pointer to the issue. Webmin isn't doing this though, and I can't re-produce this on my test systems..
I can reproduce it consistently, and reproduced it on another machine as well. Is it possible it's not "webmin" but the Shorewall plug-in pointing to the wrong file? Is there a force refresh of plug-ins?
When adding a Masquerading rule in Shorewall, the entry is then added to the /etc/shorewall/snat file instead of the /etc/shorewall/masq file. The entry is no longer seen in the Masquerading edit rule. It also does not appear in the edit Static NAT rule. In looking at the masq file, it's empty and the entry is in the snat file. Shorewall does process the rule, but there is no way to see it or edit it within Webmin, but only if the snat file is edited in the shell.