Hostnames with hyphens

Philip Pemberton via Shorewall-users <[email protected]> Sun, 2 Feb 2025 12:31:03 +0000
Newsgroups gmane.comp.security.shorewall
Message-ID <[email protected]>
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?

Thanks.
-- 
Phil.
[email protected]
https://www.philpem.me.uk/