LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 04-26-2020, 03:13 AM   #1
bartgrefte
LQ Newbie
 
Registered: Aug 2011
Posts: 15

Rep: Reputation: Disabled
nftables, portA tcp and portB udp in one rule


While rewriting my ip(6)tables firewall to nftables, I combined a bunch of rules into one. Now there are two rules that I can't seem to combine, rules that forward portA tcp and portB udp to the same ip address.

The closest example I could find is the rule listed at https://wiki.nftables.org/wiki-nftab...s#Literal_sets
Code:
nft add rule ip filter input ip saddr . ip daddr . ip protocol { 1.1.1.1 . 2.2.2.2 . tcp, 1.1.1.1 . 3.3.3.3 . udp} counter accept
This rule allows two combinations of source address, destination address and protocol. I've been trying to rewrite it to allow combinations of ports and protocol.

So far without success.

Does anyone know if it's even possible what I am trying to do here?
 
  


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 : sets or dictionaries for applying one rule to many subnets Turbocapitalist Linux - Networking 0 01-25-2020 06:45 PM
Encrypting One TCP Port and only One TCP Port? mpapet Linux - Networking 5 08-22-2017 02:20 PM
[SOLVED] i cant open UDP + TCP with our passthru cURL script, but TCP works just not both?? Good Question Linux - Networking 1 10-21-2011 11:57 AM
UDP vs TCP and tcp offload issues JonasKunze Linux - Networking 3 07-28-2011 10:02 PM
VoIP termination routes required: Ecuador Porta,Philippines PLDT,Ghana Areeba,Cameroo 7AAA Linux - Networking 1 04-29-2009 04:28 PM

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

All times are GMT -5. The time now is 12:05 PM.

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