netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sreedhar M <sreemtech@gmail.com>
To: Florian Westphal <fw@strlen.de>, netfilter@vger.kernel.org
Subject: Re: nft socket module
Date: Wed, 6 Mar 2024 12:58:04 +0000	[thread overview]
Message-ID: <CANvpR2AH5coOMmHM6zhGrGVt6XuRvga70y8oOEVv56PvGvYRJg@mail.gmail.com> (raw)
In-Reply-To: <CANvpR2AXG1by20jtuvNAkaHJ=QBnx0z+CHVM1__c2rskgX49_w@mail.gmail.com>

Thanks Florian , I see some of the rules are missing

Another translation missing - iptables-translate -t mangle -A rms0-pre
-p tcp -j TPROXY --on-port 7881 --on-ip 0.0.0.0 --tproxy-mark 0x1/0x1
iptables-translate  is not translating , please the below o/p
nft # -t mangle -A rms0-pre -p tcp -j TPROXY --on-port 7881 --on-ip
0.0.0.0 --tproxy-mark 0x1/0x1
I have translated this to below : do you see any wrong in my translation please
==> nft add rule  ip mangle  rms0-pre  meta l4proto tcp tproxy to
:7881 mark set 0x1

Thanks
Sree


On Wed, Mar 6, 2024 at 12:52 PM Sreedhar M <sreemtech@gmail.com> wrote:
>
> Thanks Florian , I see some of the rules are missing
>
> Another translation missing - iptables-translate -t mangle -A rms0-pre -p tcp -j TPROXY --on-port 7881 --on-ip 0.0.0.0 --tproxy-mark 0x1/0x1
> iptables-translate  is not translating , please the below o/p
> nft # -t mangle -A rms0-pre -p tcp -j TPROXY --on-port 7881 --on-ip 0.0.0.0 --tproxy-mark 0x1/0x1
> I have translated this to below : do you see any wrong in my translation please
> ==> nft add rule  ip mangle  rms0-pre  meta l4proto tcp tproxy to :7881 mark set 0x1
>
> Thanks
> Sree
>
>
> On Wed, Mar 6, 2024 at 9:40 AM Florian Westphal <fw@strlen.de> wrote:
>>
>> Sreedhar M <sreemtech@gmail.com> wrote:
>> > Hello
>> > I have some issues with nft socket module , please find this  , I cant
>> > get the socket functionality on nft that I was using iptables, could
>> > you please advise
>> >
>> > iptables-translate -t mangle -A qrms0-pre -p tcp -m socket -j MARK --or-mark 0x1
>> > nft # -t mangle -A qrms0-pre -p tcp -m socket -j MARK --or-mark 0x1
>>
>> Translation was missing.
>>
>> Try:
>> nft 'add rule ip mangle qrms0-pre ip protocol tcp socket wildcard 0 counter meta mark set mark or 0x1'
>
>
>
> --
> Best Regards
> Sreedhar



-- 
Best Regards
Sreedhar

      parent reply	other threads:[~2024-03-06 12:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-06  7:46 nft socket module Sreedhar M
2024-03-06  9:40 ` Florian Westphal
     [not found]   ` <CANvpR2AXG1by20jtuvNAkaHJ=QBnx0z+CHVM1__c2rskgX49_w@mail.gmail.com>
2024-03-06 12:58     ` Sreedhar M [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANvpR2AH5coOMmHM6zhGrGVt6XuRvga70y8oOEVv56PvGvYRJg@mail.gmail.com \
    --to=sreemtech@gmail.com \
    --cc=fw@strlen.de \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).