From: "Lars Noodén" <lars.nooden@gmx.com>
To: Linux Netfilter Users List <netfilter@vger.kernel.org>
Subject: snat with dynamic ip address
Date: Thu, 29 Feb 2024 12:10:51 +0200 [thread overview]
Message-ID: <8adb4670-f8c0-498f-a06f-8564ec846e37@gmx.com> (raw)
I have the following table within a NFTables rule set, but the address
given below (192.168.1.213) is assigned via DHCP and will change from
time to time. How should I rewrite that line to do SNAT using whatever
the current IPv4 address happens to be at the moment?
/Lars
table ip nat {
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
ip saddr 172.16.3.0/24 oif "wlan0" snat to 192.168.1.213
}
}
next reply other threads:[~2024-02-29 10:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 10:10 Lars Noodén [this message]
2024-02-29 10:19 ` snat with dynamic ip address seentr
2024-02-29 10:29 ` Lars Noodén
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8adb4670-f8c0-498f-a06f-8564ec846e37@gmx.com \
--to=lars.nooden@gmx.com \
--cc=netfilter@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).