[Ferm] REDIRECT question
Max Kellermann
max at duempel.org
Mon Jul 30 15:46:30 CEST 2012
On 2012/07/30 15:27, András Kovács <Andras.Kovacs at teleconnect.hu> wrote:
> I'd like to ask about REDIRECT syntax in Ferm. I use v2.1. My goal is to simply redirect a port on my firewall to an internal IP and port (SMTP server, to be precise). NAT is not used here, so port forwarding example provided in manual cannot be used.
>
> My syntax is:
>
> interface $DEV_LAN daddr <my_fw_IP> proto tcp dport smtp REDIRECT to-ports 172.18.1.14:25;
>
> It gives:
>
> REDIRECT: Bad value for "--to-ports" option: "172.18.1.14:25"
The ferm syntax is ok, and the problem is exactly what the error
message says: the "to-ports" value is bad. Check the iptables manpage
for details.
But what you're really doing wrong: REDIRECT does not do what you
think it does. What you want is DNAT. Again, the iptables manpage
explains.
Max
More information about the Ferm
mailing list