Hello,
Bonno Bloksma a écrit :
>
> All external traffic is coming via the external interface, internal traffic to the DMZ server will
> never reach this firewall.
> Either I'm not understanding what you try to write or maybe my situation is not clear enough. My
> situation is:
> INTERNET -- ExtFirewall -- DMZ -- IntFirewall -- Internal network
>
> All servers in the DMZ have public ip numbers. There is no difference in external and internal ip
> number.
[...]
> Besides tranforming outside traffic to the ip:extport combination I only need to block outside
> traffic to the ip:intport combination.
Can't you just have your services listen on both ports and just filter
the forbidden port on the external firewall ? My motto is that NAT
should be avoided as much as possible.
> As fas as I kown after the handling by the nat table there is no difference in traffic that was
> originaly to the extport and then translated and traffic that was to the internal port all the time.
There are a number of solutions.
1) Quick and dirty : DROP in mangle/PREROUTING. But filtering in mangle
is as evil as in nat, and may be deprecated too.
2) MARK packets in mangle/PREROUTING based on the original address

ort
and use the mark in nat and filter.
3) DNAT ip:intport to a different unused port and/or address that you
can drop. But that's just more NAT...