LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-06-2017, 01:44 PM   #1
netpumber
Member
 
Registered: Sep 2007
Location: In My Box
Distribution: Arch Linux
Posts: 423

Rep: Reputation: 33
Help to Convert some iptables NAT rules to nftables


Hi could someone help me convert these rules from iptables to nftables ?
Code:
iptables -P FORWARD  ACCEPT
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
So far here are my nftables ruleset
Code:
table ip FILTER {
        chain INPUT {
                type filter hook input priority 0; policy accept;
                tcp dport ssh accept
                ct state established,related counter packets 178 bytes 14723 accept
                drop
                iif lo accept
        }

        chain OUTPUT {
                type filter hook output priority 0; policy accept;
                oif lo accept
                accept
        }
}
table ip NAT {
}
Thanks
 
Old 03-08-2017, 03:51 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,976

Rep: Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623Reputation: 3623
Sorry this has sat for a bit. Not sure I know the full easy answer but https://wiki.nftables.org/wiki-nftab...es_to_nftables has some way to do it.

Should be able to use firewallbuilder to import and export also. http://www.fwbuilder.org/4.0/docs/us...-example.shtml
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iptables nat rules crspy Linux - Networking 1 05-03-2013 03:44 AM
iptables rules to limit nat forwarding sleepylight Linux - Security 1 07-19-2012 06:06 PM
Programming iptables rules for 1:1 NAT jacques83 Linux - Security 18 09-21-2010 05:07 PM
iptables rules for emule in nat box eantoranz Linux - Networking 3 08-08-2005 09:37 PM
iptables -t nat -L not showing all rules alpha-wolf Linux - Networking 0 08-14-2001 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration