LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 03-04-2021, 09:45 AM   #1
notooth
Member
 
Registered: Apr 2005
Posts: 192

Rep: Reputation: 15
NFTables questions


I am studying NFTables, and I have some rules in /etc/nftables/nftables_firewall:
Code:
table ip filter {
	chain output {
		type filter hook output priority 100; policy accept;
	}

        # allow LAN to firewall, disallow WAN to firewall
	chain input {
		type filter hook input priority 0; policy accept;
		iifname "lan0" accept
		iifname "wan0" drop
	}
Can anyone tell me how to apply these rules without rebooting?
 
Old 03-04-2021, 10:49 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,708

Rep: Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972Reputation: 7972
Quote:
Originally Posted by notooth View Post
I am studying NFTables, and I have some rules in /etc/nftables/nftables_firewall:
Code:
table ip filter {
	chain output {
		type filter hook output priority 100; policy accept;
	}

        # allow LAN to firewall, disallow WAN to firewall
	chain input {
		type filter hook input priority 0; policy accept;
		iifname "lan0" accept
		iifname "wan0" drop
	}
Can anyone tell me how to apply these rules without rebooting?
Yes...the NFTables documentation can.
https://wiki.nftables.org/wiki-nftab....php/Main_Page

You say you're 'studying' this...if you are, it's odd you haven't read the documentation. And you've been a member here for *FIFTEEN YEARS*...you should know the LQ Rules and "Question Guidelines", about doing basic research first.
 
Old 03-04-2021, 10:57 AM   #3
Turbocapitalist
LQ Guru
 
Registered: Apr 2005
Distribution: Linux Mint, Devuan, OpenBSD
Posts: 7,333
Blog Entries: 3

Rep: Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730Reputation: 3730
It's a strange question since it is covered multiple places both in the wiki and in the manual page.

But to answer the question, read up on the -f option.
 
1 members found this post helpful.
Old 04-15-2021, 11:43 AM   #4
jdrosales
LQ Newbie
 
Registered: Feb 2020
Location: Virginia, USA
Distribution: Ubuntu, Debian
Posts: 21
Blog Entries: 1

Rep: Reputation: 3
While I agree with the two previous answers about basic knowledge, here is how I do it:

Code:
sudo service nftables reload ( or restart ) whichever suits you.
 
  


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
NFTables To Replace iptables In the Linux Kernel jeremy Linux - News 0 10-21-2013 11:02 AM
LXer: NFTables IPTables-Replacement Queued For Linux 3.13 LXer Syndicated Linux News 0 10-20-2013 08:41 AM
LXer: Linux: First Release Of nftables LXer Syndicated Linux News 0 04-02-2010 06:00 AM
LXer: This week at LWN: Nftables: a new packet filtering engine LXer Syndicated Linux News 0 04-09-2009 09:40 AM
LXer: New Kernel Firewall Nftables to Succeed Netfilter LXer Syndicated Linux News 0 03-21-2009 11:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:51 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