All of lore.kernel.org
 help / color / mirror / Atom feed
* NAT and ICMP
@ 2025-02-14 18:48 Chris Hall
  2025-02-19 23:31 ` Sunny73Cr
  0 siblings, 1 reply; 7+ messages in thread
From: Chris Hall @ 2025-02-14 18:48 UTC (permalink / raw)
  To: netfilter


I have a firewall/router using nft.  It connects to the outside world 
with a single globally routeable IP address ('Real-IP').

I want to use the Real-IP both for NAT and for the firewall/router itself.

My understanding is that for tcp and udp:

   * for private source IPs, I can configure SNAT to use one port
     range, say 16384:65535.

   * and I can, elsewhere, configure the firewall/router to use a
     different range, say 0.16383, with no NAT required (inbound
     or outbound).

But for ICMP queries, I cannot find equivalent settings to manage the 
"Query Identifier".

It has occurred to me that the trick might be to SNAT all outbound ICMP 
queries, something like:

   .... ip protocol ICMP ip saddr 203.0.113.1 snat to 203.0.113.1
   .... ip protocol ICMP ip saddr 10.0.0.0/8  snat to 203.0.113.1

where 203.0.113.1 is the Real-IP. I'm guessing NATing the source address 
to itself is OK... yes ?

------------------------------------------------------------

Separately: where should I look to find the degree of conformance to the 
various "NAT Behavioural Requirements": RFCs 4787, 5382, 5508 and 7857 ?

------------------------------------------------------------

Thanks,

Chris


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-02-21  1:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <200502171912.j1HJCFV06530@isis.cs3-inc.com>
2005-02-18 19:43 ` NAT and ICMP Don Cohen
2005-02-18 19:57   ` Michael Gale
2005-02-18 21:10     ` Michael Gale
2005-02-18 20:47   ` Patrick McHardy
2025-02-14 18:48 Chris Hall
2025-02-19 23:31 ` Sunny73Cr
2025-02-21  1:40   ` Sunny73Cr

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.