LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


Closed Thread
  Search this Thread
Old 09-11-2019, 02:14 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
What would be the equivalent of this iptables command in firewalld?


What would be the equivalent of this iptables command in firewalld?

Code:
/sbin/iptables -t nat -A OUTPUT -m owner ! --uid-owner proxy_user -d 169.254.169.254 -p tcp -m tcp --dport 80 -j DNAT --to-destination 127.0.0.1:9090
 
Old 09-11-2019, 06:51 PM   #2
ferrari
LQ Guru
 
Registered: Sep 2003
Location: Auckland, NZ
Distribution: openSUSE Leap
Posts: 5,790

Rep: Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140Reputation: 1140
You may be best to use a firewalld direct rule to allow adding iptables rules with more fine-grained control...

Reference:
Code:
man firewalld.direct
Some examples:
http://wrightrocket.blogspot.com/201...firewalld.html
https://www.lisenet.com/2016/firewal...r-as-a-router/
 
1 members found this post helpful.
Old 07-21-2020, 11:21 AM   #3
wearenotallgurus
LQ Newbie
 
Registered: Jul 2020
Posts: 1

Rep: Reputation: Disabled
Arrow

just disable firewalld and yum install iptables if that's what you're are comfy with
 
Old 07-21-2020, 03:58 PM   #4
vincix
Senior Member
 
Registered: Feb 2011
Distribution: Ubuntu, Centos
Posts: 1,240

Rep: Reputation: 103Reputation: 103
Quote:
Originally Posted by wearenotallgurus View Post
just disable firewalld and yum install iptables if that's what you're are comfy with
And you actually had to create a user just to suggest something as stupid as that?
 
1 members found this post helpful.
Old 07-23-2020, 10:31 AM   #5
marliyev
Member
 
Registered: Apr 2020
Location: Jamaica
Posts: 68

Rep: Reputation: Disabled
Quote:
Originally Posted by abefroman View Post
What would be the equivalent of this iptables command in firewalld?

Code:
/sbin/iptables -t nat -A OUTPUT -m owner ! --uid-owner proxy_user -d 169.254.169.254 -p tcp -m tcp --dport 80 -j DNAT --to-destination 127.0.0.1:9090
add this rules to firewall-cmd --direct [--add-rule | --passthrough ]
 
Old 07-23-2020, 10:49 AM   #6
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,616

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by marliyev View Post
add this rules to firewall-cmd --direct [--add-rule | --passthrough ]
This thread is from LAST YEAR. Anyone finding this is advised to read the firewall-cmd documentation. Doing what's suggested here has consequences; from the firewall-cmd docs:
Code:
--direct --passthrough { ipv4 | ipv6 | eb } args
Pass a command through to the firewall. args can be all iptables, ip6tables and ebtables command line arguments.
This command is untracked, which means that firewalld is not able to provide information about this command later on, also not a listing of the untracked passthoughs.
Bolded for emphasis. Doing things with the firewall that don't give you information about their status is never a bright idea.
 
Old 07-23-2020, 10:59 AM   #7
marliyev
Member
 
Registered: Apr 2020
Location: Jamaica
Posts: 68

Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
This thread is from LAST YEAR. Anyone finding this is advised to read the firewall-cmd documentation. Doing what's suggested here has consequences; from the firewall-cmd docs:
Code:
--direct --passthrough { ipv4 | ipv6 | eb } args
Pass a command through to the firewall. args can be all iptables, ip6tables and ebtables command line arguments.
This command is untracked, which means that firewalld is not able to provide information about this command later on, also not a listing of the untracked passthoughs.
Bolded for emphasis. Doing things with the firewall that don't give you information about their status is never a bright idea.
are you following me? I want to comment on this post, what do you care?
 
Old 07-23-2020, 12:11 PM   #8
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,616

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by marliyev View Post
are you following me? I want to comment on this post, what do you care?
Giving people bad advice (especially about system security) isn't good. Again, anyone coming across this (like your other threads) may take this bad advice, which is why I advised against it.

Last edited by TB0ne; 07-23-2020 at 12:15 PM.
 
1 members found this post helpful.
Old 07-23-2020, 12:18 PM   #9
marliyev
Member
 
Registered: Apr 2020
Location: Jamaica
Posts: 68

Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
Giving people bad advice (especially about system security) isn't good. Again, anyone coming across this (like your other threads) may take this bad advice, which is why I advised against it. Taking system security advice from someone who was unable to run a shell-script doesn't seem like a good idea.
haha)) bad advice... you cant resolve my thread so i advice you to delete your account and begin to use Photoshop))) u r fake Guru here, your place is internet cafe))) if you are man, delete your account and leave this forum, u r not guru, u r looser))
 
Old 07-23-2020, 01:21 PM   #10
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,616

Rep: Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962Reputation: 7962
Quote:
Originally Posted by marliyev View Post
haha)) bad advice... you cant resolve my thread so i advice you to delete your account and begin to use Photoshop))) u r fake Guru here, your place is internet cafe))) if you are man, delete your account and leave this forum, u r not guru, u r looser))
No one can resolve any of your issues, apparently, according to you. Mainly because you cannot form a clear question or provide details, and keep contradicting yourself. And you keep ignoring the LQ Forum rules. Reported, yet again...the moderators will deal with you.
 
Old 07-23-2020, 01:22 PM   #11
marliyev
Member
 
Registered: Apr 2020
Location: Jamaica
Posts: 68

Rep: Reputation: Disabled
Quote:
Originally Posted by TB0ne View Post
No one can resolve any of your issues, apparently, according to you. Mainly because you cannot form a clear question or provide details, and keep contradicting yourself. And you keep ignoring the LQ Forum rules. Reported, yet again...the moderators will deal with you.
reported
 
Old 07-23-2020, 02:06 PM   #12
jeremy
root
 
Registered: Jun 2000
Distribution: Debian, Red Hat, Slackware, Fedora, Ubuntu
Posts: 13,600

Rep: Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083Reputation: 4083
vincix, this kind of behavior isn't tolerated at LQ.
marliyev, please stay on topic and constructive.

--jeremy
 
1 members found this post helpful.
  


Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
[SOLVED] fedora 29 firewalld command error - iptables-restore f2b-sshd doesnt exist switcher1 Linux - Newbie 1 04-24-2019 09:09 AM
iptables and firewalld on RHEL7/Centos7 sigint-ninja Linux - Newbie 5 05-26-2016 08:15 AM
Replace IPTables with Firewalld? acidblue CentOS 5 08-06-2015 07:39 PM
[SOLVED] iptables not active/firewalld is - my web server is working but I have no idea why. Skiph Linux - Newbie 6 03-25-2015 02:16 PM

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

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