On Sun, 2 Feb 2025 12:31:03 +0000
Philip Pemberton via Shorewall-users
<shorewall-users@lists.sourceforge.net> wrote:

> Hi,
> 
> I've been trying to add a DNAT rule which refers to a server whose 
> hostname includes a hyphen:
> 
> SMTP/DNAT       net             loc:int-mailserver
> 
> Shorewall rejects this with an error in the macro:
> 
> shorewall[2105151]: Compiling /etc/shorewall/rules... 
> 
> shorewall[2105151]:    ERROR: Invalid IP Address (int) 
> /usr/share/shorewall/macro.SMTP (line 12)
> shorewall[2105151]:       from /etc/shorewall/rules (line 83) 
> 
> 
> I've tried escaping the dashes but Shorewall gives me a different
> error:
> 
> shorewall[2104309]:    ERROR: Shorewall Configuration file entries
> may not contain double quotes, single back quotes or backslashes 
> /etc/shorewall/rules (line 83)
> 
> Is there a way to do this, short of adding an alias to /etc/hosts 
> without the hyphens?

Hyphen is not the issue. Issue is non-fqdn hostname, I'd guess.
Documentation is very clear, it advices against dns names.
Please read this part of documentation carefully and please, don't use
dns name in config.

https://shorewall.org/manpages/shorewall-names.html#idm30


-- 
Tuomo Soini <t...@foobar.fi>
Foobar Linux services
+358 40 5240030
Foobar Oy <https://foobar.fi/>


_______________________________________________
Shorewall-users mailing list
Shorewall-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/shorewall-users

Reply via email to