Ask Your Question

iptables help?

asked 2017-02-26 05:50:28 -0500

einsviel gravatar image

So... I want to use iptables to block other user account in my workstation from accessing internet. What I'm doing is running this:

# iptables -A OUTPUT -o wlp2s0 -m owner --uid-owner 1001 -j DROP

as the user ID of what I want to block is 1001 and wlp2s0 is the only outgoing internet access I have.

now, I want to save it, which in this guide:

uses service command, which gives me this output:

The service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.

and systemctl doesn't recognize iptables as one of the valid operation.

I don't know anything about iptables beside the guide and a few I've read here and there.

So, by that guide, there should be an iptables file in /etc/init.d?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-02-26 09:18:50 -0500

kdg1955 gravatar image

Recently Fedora had replaced iptables by firewall as default configuration tool for ip tables. But don't worry, it's still present. But the service is not started.

To start the service:

sudo systemctl start iptables

To persistent the service:

sudo systemctl enable iptables

edit flag offensive delete link more


Nevermind. I'm just going to search for this option in firewalld. I don't have expertise to simultaneously using firewalld and iptables, and there must be a reason for switching to firewalld.

einsviel gravatar imageeinsviel ( 2017-02-26 17:23:03 -0500 )edit

Question Tools


Asked: 2017-02-26 05:50:28 -0500

Seen: 94 times

Last updated: Feb 26 '17