Questions tagged [iptables-persistent]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
29 views

Something is modifying my iptable, can it be traced?

I've got the following command in my iptable: -A FORWARD -o enp0s3 -j ACCEPT That somebody doesn't like, because after 2 reboots, it's gone from the iptable... I've got iptables-persistent installed, ...
0
votes
0answers
47 views

Can UFW work with iptables-persistent?

I used a script to set up iptables rules and then made them persistent with iptables-persistant. This is described here as a means to prevent a certain user sending traffic over eth0 so it can just ...
1
vote
1answer
137 views

Debian10 iptables-restore [legacy] just fails with simplest rule

I'm trying to set up a simple firewall with docker and I wanted to use iptables-restore. I changed the iptables used to legacy (so shouldn't use nftables if I'm right). The problem is that even a file ...
0
votes
1answer
103 views

Ubuntu 18.04 Server Internal and External network configuration

I have issue in Ubuntu 18.04 Server to configurate internal and external network. Case is that i have Gateway device which has DHCP service to lease IP addresses for wlan connected devices. Gateway ...
1
vote
0answers
158 views

arptables-nft persistence

Introduction This is on Debian Buster with kernel 4.19.0-6 I've installed iptables-persistent and netfilter-persistent versions 1.0.11 and added a basic rule to arptables-nft to block all LAN ...
0
votes
2answers
65 views

Default configuration iptables, how to avoid to be blocked when flushing tables?

I have this base for iptables when I have a new server to configure : *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [0:0] # Keep state. -A INPUT -m state --state ESTABLISHED,RELATED -...
2
votes
2answers
866 views

Force iptables to immediately put drop rule into effect

I have the following setup: in /etc/iptables/rules.v4 # Generated by iptables-save v1.4.21 on Mon Jul 1 11:32:00 2019 *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [3:620] -A ...
0
votes
2answers
953 views

How to get UFW to read current iptables rules after modification? (Ubuntu)

I am adding a chain using iptables: iptables -N ETDROP When I reboot, this is lost. I read of many ways to make iptables rules permanent... however You must remember, I am using UFW and UFW has ...
2
votes
1answer
1k views

How to save only specific iptables chains?

I need to configure iptables on a linux machine with running docker containers. If I save iptables rules with iptables-save > /etc/iptables/rules.v4, rules from all chains will be written to file. ...
1
vote
1answer
1k views

iptables-restore failed in Debian buster/sid if it has --multiport option in the rules file

I have /etc/iptables/rule.v4 file contains many rule, the below is the line where I see the issue -A INPUT -p tcp -m multiport --dports 22 -j ACCEPT -A INPUT -p udp -m multiport --dports 16384:32768 -...
0
votes
1answer
87 views

iptables: what happen after a reboot?

Installing NCPA for nagios, I found these instructions iptables -I INPUT -p tcp --destination-port 5693 -j ACCEPT apt-get install -y iptables-persistent Answer yes to saving existing rules Of course,...
4
votes
1answer
1k views

fail2ban with iptables-persistent

I've been running fail2ban for a bit, and recently installed iptables-persistent and am using it with ipset for a blacklist (there's one particular IP that is always hammering away at this machine). ...
2
votes
1answer
932 views

Masquerade rule with netfilter-persistent

I use netfilter-persistent to manage a firewall. I would like to share a connection between two interfaces using masquerading (example, or another). When I run those operations by invoking iptables ...
1
vote
2answers
330 views

Use the LANs of one server to access the LAN of another

I'm a bit lost here, so I'm asking for your help. =D I have three servers: 1# - LANs A and B 2# - LANs B and C 3# - LANs C and D How can I make server 1# access through LAN B an ip that is in LAN D ...
1
vote
1answer
184 views

Running iptables commands on boot (on locked down, IoT device)

I am using a cell modem / router that is running a vendor custom distribution of Linux kernel 3.12.70. I'd like to add custom iptables rules, but they keep being deleted on reboot. I've tried https:/...
2
votes
3answers
4k views

Persistent iptables

I've just read about iptables-persistent and I'm completely lost w.r.t. the design. I'm not the only one, who didn't understand how it works, but actually it seems to be way beyond my imagination. I ...
0
votes
0answers
680 views

Cannot connect to SSH with iptables firewall enabled

I cannot seem to connect to my VPS even when enabling port 22 on my firewall. I have tried multiple iptables inputs to try and allow SSH to work. This is a debian 9 stretch system with iptables ...
1
vote
0answers
40 views

Unusual behavior in iptables

I am currently running a xubuntu 16.04.1 VM on VMWare using bridged networking. The end goal is to have only DNS and outgoing HTTP/HTTPS. Iptables (latest version with iptables-persistent) is ...
0
votes
2answers
518 views

Debian 8, ping 127.0.0.1 not working

On my Debian 8 `uname -a' gives: Linux uname 3.16.0-4-amd64 #1 SMP Debian 3.16.36-1+deb8u1 (2016-09-03) x86_64 GNU/Linux Tried route -n gives: Kernel IP routing table Destination Gateway ...
2
votes
4answers
288 views

iptables-persistent blocking any outbound connections

I use iptables-persistent to set firewall rules. This is my standard configuration: *filter :INPUT DROP [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -p tcp --dport ...
0
votes
2answers
386 views

Iptables accepts any ip or range in any format

Update Jun 30 I have a list of ips.txt and I want iptables accepts any ip or range in any format. Example: # IPs List 199.59.243.120 157.60.1.0/24 91.190.0.0/16 192.168.2.1-192.168.2.25 My rule: ...
1
vote
1answer
637 views

Is it possible to save iptable rules that have a name for destination instead of IP?

For instance, I have the rule #iptables -A OUTPUT -d www.google.com -j ACCEPT When I type this rule in a terminal it resolves to the appropriate IPs, and that is what is stored in rules.v4 when I ...
2
votes
1answer
4k views

Debian 8 iptables-persistent setup is not correct?

I'm renting a vps with debian 8 on it. I'm trying to set up my iptables, following this blog: http://bencane.com/2012/09/iptables-linux-firewall-rules-for-a-basic-web-server/ The problem is that my ...
2
votes
1answer
4k views

iptables rule in /etc/rc.local are not loaded

/etc/iptables.conf contains a rule to dump my outgoing packets to 10.199 network as, *filter :INPUT ACCEPT [122:9273] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [73:8165] -A OUTPUT -d 10.199.48.0/24 -j ...
1
vote
1answer
3k views

How can I fix “insserv: There is a loop between service mountnfs and nfs-common if started” in Debian wheezy?

I'm working on a Debian wheezy x64 box, with dist-upgrade to: Debian 7.7 (wheezy) 64-bit kernel Linux 3.2.0-4-amd64 It's configured with Linux RAID10, dm-crypt/LUKS and LVM. I've installed ...
0
votes
1answer
340 views

Connection lost to VPS While using iptables by default policy as DROP for INPUT, OUTPUT, FORWARD

I'am using iptables in many server's but now stuck with this issue while using default Policy as DROP. Here is my rules which i have used in VPS, Tried many time's everything seems fine but VPS ...
2
votes
3answers
14k views

how to make firewall changes permanent via firewall-cmd?

I am trying to open some ports in CentOS 7. I am able to open a port with the following command: firewall-cmd --direct --add-rule ipv4 filter IN_public_allow 0 -m tcp -p tcp --dport 7199 -j ACCEPT ...
0
votes
0answers
2k views

Upon bootup, all iptables are lost because the kernel module ip_set is not loaded

i can get iptables to whitelist / blacklist using ipset members, but after a reboot, the iptables are emptied out because the kernel module is not loaded. Have limped along in the past by customizing ...
0
votes
1answer
113 views

how to get effect of IP rules script in RHEL 6?

I have written one ip.sh file in that I have written one rule and then saved the iprules with the corresponding commands. Now when I opened /etc/sysconfig/iptables nothing is reflecting. I need the ...
3
votes
1answer
2k views

How to combine iptables rulesets

Say there are several iptables scripts (run at boot time), all of which run something like iptables -A ... to add rules. I'm thinking this could be improved, turning all those shell scripts into text ...
2
votes
2answers
8k views

IPtables reset on reboot, how do I tell what is causing this

Using RHEL, and I have had some "Cyber Security" people work on my server. I'm now using this server in a completely closed environment with no outward network connection, and would like my iptables ...
23
votes
5answers
68k views

Why isn't the Iptables persistent service saving my changes?

I followed this tutorial to set up IP rules on ubuntu 12.04. Everything worked fine on setup -- but now I've made changes to the firewall that do not persist upon reboot. I do not understand why that ...