eupolicy.social is one of the many independent Mastodon servers you can use to participate in the fediverse.
This Mastodon server is a friendly and respectful discussion space for people working in areas related to EU policy. When you request to create an account, please tell us something about you.

Server stats:

196
active users

#netmap

0 posts0 participants0 posts today
DrScriptt<p><a href="https://oldbytes.space/tags/iptables" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iptables</span></a>' <a href="https://oldbytes.space/tags/NETMAP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NETMAP</span></a> is functionally for IPv4 what network prefix translation (NPT) is for IPv6.</p>
DrScriptt<p><a href="https://oldbytes.space/tags/iptables" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iptables</span></a>' <a href="https://oldbytes.space/tags/NETMAP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NETMAP</span></a> target can alter the source IP range exclusive or the destination IP range.</p><p>Which it does is dependent on where you use the NETMAP target.</p><p>If you use the NETMAP target in the PREROUTING chain of the mangle table, it alters the destination ip range.</p><p>If you use the NETMAP target in the POSTROUTING chain of the mangle table, it alters the source IP range.</p>
DrScriptt<p>It has been zero days since <a href="https://oldbytes.space/tags/iptables" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>iptables</span></a> solved a problem I shouldn't have to solve. Specifically the <a href="https://oldbytes.space/tags/NETMAP" class="mention hashtag" rel="nofollow noopener" target="_blank">#<span>NETMAP</span></a> target.</p><p>iptables -t mangle -A PREROUTING -s 192.0.2.0/24 -d 198.51.100.0/24 -i eth1 -j MARK --set-xmark 0xdeadbeef/0xffffffff</p><p>iptables -t nat -A PREROUTING -s 192.0.2.0/24 -d 198.51.100.0/24 -i eth1 -m mark --mark 0xdeadbeef -j NETMAP --to 192.0.2.0/24</p><p>iptables -t nat -A POSTROUTING -s 192.0.2.0/24 -d 192.0.2.0/24 -o eth1 -m mark --mark 0xdeadbeef -j NETMAP --to 198.51.100.0/24</p>