IPSET-TRANSLATE(8)

πŸ“¦
version 7.24 Β· 2 versions
  • 7.24 Β· alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 7.15 Β· ubuntu jammy
, in alpine 3.22, alpine 3.23, alpine 3.24, arch rolling, centos-stream 10, centos-stream 9, debian bookworm, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’… IPSET-TRANSLATE β€” the manual page, but make it cute

okay bestie, pull up a chair, we're reading the ipset-translate manual page from the System Manager's Manual and honestly? it's giving glow-up arc. πŸ¦‹


✨ NAME ✨

ipset-translate β€” a translation tool to migrate from ipset to nftables. no cap, that's literally the whole job. πŸŽ€


🌸 DESCRIPTION 🌸

This tool lets system administrators translate a given IP sets file over to nftables(8). it's a converter, not a magician. πŸ’«

The only available command is:

  • ipset-translate restore < file.ipt

that's it. that's the command. one (1) command and she ate. πŸ‘‘


πŸ’– USAGE πŸ’–

So here's the vibe: ipset-translate reads an IP sets file in the syntax produced by ipset(8) save. 🌈

No set modifications occur β€” bestie, this tool is a text converter. periodt. it does not touch your sets, it does not change your sets, it just reads and rewrites. 🫢


πŸŽ€ EXAMPLES πŸŽ€

Basic operation examples. let's get into it. ✨

Single command translation, assuming the original file:

create test1 hash:ip,port family inet counters timeout 300 hashsize 1024 maxelem 65536 bucketsize 12 initval 0xb5c4be5d
add test1 1.1.1.1,udp:20
add test1 1.1.1.1,21
create test2 hash:ip,port family inet hashsize 1024 maxelem 65536 bucketsize 12 initval 0xb5c4be5d

which results in the following translation:

root@machine:~# ipset-translate restore < file.ipt
add set inet global test1 { type ipv4_addr . inet_proto . inet_service; counter; timeout 300s; size 65536; }
add element inet global test1 { 1.1.1.1 . udp . 20 }
add element inet global test1 { 1.1.1.1 . tcp . 21 }
add set inet global test2 { type ipv4_addr . inet_proto . inet_service; size 65536; }

like??? she translated it flawlessly. main character energy fr fr. πŸ’…


😭 LIMITATIONS 😭

okay so, real talk time. A few IP sets options may be not supported, because they are not yet implemented in nftables(8). not our fault, not your fault, it's just the situation. πŸ’€

Contrary to nftables(8), IP sets are not attached to a specific table. The translation utility assumes that sets are created in a table whose name is global and family is inet. You might want to update the resulting translation to use a different table name and family for your sets. πŸ‘€

bestie please read that again β€” the tool is assuming global / inet for you. if that's not your vibe, go edit the output. it's not being sneaky, it's just a default. πŸ™ˆ

To get up-to-date information about this, please head to https://wiki.nftables.org/. πŸ¦‹


🫢 SEE ALSO 🫢


πŸ‘‘ AUTHORS πŸ‘‘

The nftables framework has been written by the Netfilter Project (https://www.netfilter.org). iconic behavior. πŸ”₯

This manual page was written by Pablo Neira Ayuso <pablo@netfilter.org>. πŸ’œ

This documentation is free/libre under the terms of the GPLv2+. slay, open source rights. 🌈

This tool was funded through the NGI0 PET Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 825310. 🧚


and that's the whole page bestie!! πŸ’– this beauty dropped way back on May 31, 2021, from the System Manager's Manual, and it's still out here translating your ipset files into nftables like a champ. go forth and restore responsibly. πŸŒΈβœ¨πŸ“