Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [iptables-persistent]

The tag has no usage guidance.

1
vote
2answers
20 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
62 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 -...
16
votes
5answers
44k 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 ...
0
votes
1answer
29 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,...
0
votes
1answer
112 views

Masquerade rule with netfilter-persitent

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
1answer
346 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). ...
1
vote
3answers
2k 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 ...
1
vote
2answers
9k 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 ...
1
vote
2answers
169 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
51 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:/...
1
vote
0answers
403 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
34 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 ...
2
votes
4answers
160 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
325 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 ...
0
votes
2answers
266 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
311 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
3k 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 ...
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 ...
2
votes
1answer
3k 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 ...
3
votes
1answer
1k 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 ...
0
votes
1answer
265 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 ...
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
102 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 ...
2
votes
2answers
7k 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 ...