iptables is the userspace command line program used to configure the Linux 2.4.x and 2.6.x IPv4 packet filtering ruleset. It is targeted towards system administrators. Please, when asking a question about iptables, add the output from the following command: iptables -L -v -n

learn more… | top users | synonyms (1)

1
vote
1answer
34 views

Need help translating rate limiting iptables rules to Puppet format

I use Puppet Iptables module to manage Iptables rules on my machine. I'd like to implement to rate limit failed SSH connections as described here: iptables -A INPUT -p tcp --dport 22 -m recent ...
0
votes
1answer
206 views

How can I reload IPTables without interrupting existing connections?

I will be adding and removing entries to the script below automatically (adding ports 80/443 with different IP addresses). If I run this script, I am "assuming" that connections will be uninterrupted, ...
0
votes
1answer
125 views

Ubuntu 14.04 UWF for iptables

Can I still use the init.d iptables stop? It seems that init.d is replaced by systemd. Is that correct? The iptables is part of the kernel right and not a service. On redhat based systems it is a ...
-1
votes
2answers
39 views

Allow connection only from 2 ips [closed]

I need to block all connection on port 30000. I alredy did that , with command like that iptables -I INPUT ! -s IP_HERE -p tcp --dport 30001 -j DROP but now i need 2 ips , how i could do that? ...
0
votes
0answers
36 views

rkhunter reports suspicious activity /bin/usr/wget and killall permissions changed

Sorry about the long post but please bear with me. I'm wondering if my system has been compromised. I've had issues in the past on this VM server with a Linux.BackDoor.Gates.5 Trojan that was DDoSing ...
2
votes
2answers
134 views

How to setup IPTables on KVM host - iptables-persistent is being ignored

I'm trying to setup some specific IPTables rules on an ubuntu 14.04.1 host that runs some KVM guests. The box has multiple NICs with multiple IP addresses and the guests use different addresses based ...
0
votes
0answers
30 views

Iptables and PREROUTING-Chain. Checking only the first (SYN-) packet of a connection?

Assume for simplicity that there is only this one rule described below. Is it possible that the PREROUTING Chain of ip-tables checks only the first packet of connection A and then allows all ...
3
votes
2answers
771 views

Iptables management with ansible in huge environment

What is the best way to manage iptables from one point and have the ability to edit something on local server. We need to add some rules centralized on all servers, but we have specific servers with ...
0
votes
1answer
52 views

iptables DROP statement causing issues

iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables -A INPUT -p tcp --dport ssh -j ACCEPT iptables -A INPUT -p tcp --dport 80 -j ACCEPT iptables -A INPUT -j DROP I have the ...
1
vote
1answer
46 views

Unknown arg `--hashlimit-upto'

I'm trying to prevent loic attackes by using this command iptables -A INPUT -p tcp --dport 80 -m hashlimit --hashlimit-upto 50/min \ --hashlimit-burst 500 --hashlimit-mode srcip --hashlimit-name http ...
-2
votes
1answer
38 views

Multiport negation in iptables

Consider I want to make a rule that if destination port of the incomming packet is any of the ports 80,120,130 for established or related states the system should drop it but other ports should be ...
-1
votes
1answer
14 views

How to redirect ip to address iptables

I would like to know if is there a way to redirect the internal ip to another ip, but the second ip is Dynamically so i need to put an address, is there a way? Example: iptables -t nat -I OUTPUT ...
-1
votes
1answer
29 views

command not foundbles-config error on service firewall restart

This is a follow-up question after I fixed my initial problems: I have a CENTOS Linux VPS. I have the following in my IPTABLES script to run when my VPN restarts, but I get errors when I do a service ...
1
vote
1answer
66 views

IPTABLES command that end with ACCEPT or DROP fail on service firewall restart

I have a CENTOS Linux VPS. I have the following in my IPTABLES script to run when my VPN restarts, but I get errors when I do a service firewall restart I've ran each of the commands below manually ...
1
vote
0answers
45 views

xtable geoip filter unable to load into memroy

Ok, I have a odd problem. I just got done doing the bas configuring of my server. Adding in fail2ban, postfix, apache, mysql, ect ect. I then went in and started to add the xtable addons. I ...
0
votes
0answers
41 views

puppetlabs/firewall nat policy issue

I'm using puppetlabs/firewall. I need to create following iptable rules: iptables -A PREROUTING -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 8443 My manifests is firewall { '001 default ...
0
votes
1answer
69 views

OpenVPN with no internet access

I am using OpenVPN and am able to connect, but with no internet access anymore. Here is my ip table: sshadmin@mdpi1:/etc/openvpn/easy-rsa/keys$ netstat -nr Kernel IP routing table Destination ...
3
votes
2answers
594 views

iptables -F locks me out of the server until reboot, why?

I'm trying to apply some iptables rules and iptables -F is supposed to remove the current rules (from my understanding), but instead it appears to freeze my SSH connection and not let me re-establish ...
-2
votes
1answer
35 views

Iptables “if not” condition?

I am trying to create a rule for iptables which logically does the following: IF [destination != 192.168.0.1] forward port 80 requests to port 3128 else carry on like this never ...
0
votes
1answer
32 views

will renaming iptables mean I have no firewall after a reboot?

I'm having some issues accessing my VPS due to a combination of things. Serial console via my VPS control panel isn't accepting input either so my VPS host has offered to mount my file system on the ...
0
votes
1answer
31 views

Drop packets after NAT in iptables

I'm trying to rate limit traffic to a certain client behind the NAT (using hashlimit combined with DROP target) using iptables rule but due to my rudimentary knowledge of this area, I'm not sure which ...
-1
votes
1answer
40 views

Why does this IPTables command create 4 entries?

When I executed this IPTables command: iptables -A INPUT -p tcp -m tcp --dport 9080 -s localhost -d localhost -j ACCEPT iptables -L shows: ACCEPT tcp -- localhost localhost ...
0
votes
0answers
89 views

nginx images, css not loading from outside LAN

On my LAN, all the websites hosted on the nginx machine load fine. When outside of the LAN, they usually don't load at all, and if they do it takes several clicks of the refresh button and several ...
0
votes
0answers
62 views

Site to Site VPN - Openswan and CISCO A2A

Below is the diagram that the VPN connection between Openswan server and CISCO A2A. http://i.stack.imgur.com/yQBSw.jpg client A and B are remote hosts with static ips. client X and Y are behind the ...
0
votes
1answer
198 views

lots of UDP_IN Blocked errors

Since I have reinstalled my OS, I'm getting lots of UDP_IN Blocked errors in my messages log. Can anyone kindly explain what the error say exactly and what I can do to get rid of this error. Aug 8 ...
0
votes
2answers
68 views

How to block a VM from accessing other machines on network - XenServer

This might be a little far fetched and might not be possible. I have a virtual machine that will have files on that I don't want people to be able to transfer off - they are allowed access, I just ...
0
votes
2answers
86 views

list all route tables

I need to know how to list the IDs of all route tables. For example, I can run: ip rule add fwmark 2 table 104 ip route add dev eth0 default via 192.168.3.7 table 104 A call to ip rule list shows: ...
0
votes
1answer
87 views

Linux Unraid route traffic through different interfaces

I have two interfaces: eth0 and tun5. eth0 is an ethernet to a router and tun5 is a VPN tunnel. These are on an UnRaid server, which is based on Linux. It's a headless server so I access it via SSH. ...
1
vote
1answer
90 views

vsftpd filezilla and iptables on ubuntu

So I followed the instructions (for ubuntu 10.04): here (for setting up iptables) and here (saving the iptables) and finally and laughably here (because 10.04 won't get the saved version), now ...
0
votes
1answer
101 views

block internal ip brute force attack

Here's someone doing a bruteforce attack on my server for several days now, each time through a different external IP address (hundreds so far) but always through the same I assume local IP address: ...
-2
votes
1answer
26 views

Disable internal routing

I have 4 different subnets that go in to one Linux box that have openswan and configured VPN's. In the linux box i have configured one interface that is public and sub interfaces that are private. For ...
0
votes
0answers
68 views

Simple Shorewall/netfilter traffic control/prioritization questions and possible strange side effects

I am setting up traffic prioritization for a small business to prioritize videoconferencing traffic over general web traffic. I use Shorewall (which controls iptables/netfiler) on a linux machine for ...
2
votes
1answer
220 views

Proxmox Nat Networking Issue

Definition I have installed Proxmox 3.2 and i am trying to configure a virtual machine as a communication server that handles all traffic and forwards them to the nodes with private ip. I ...
1
vote
2answers
52 views

Iptables does not seem to be applying SNAT to packets sent on a raw socket

I'm sending packets from a user space program to my wireless interface wlan0. I've set up a SNAT rule with iptables as follows iptables -t nat -A POSTROUTING -o wlan0 -j SNAT --to 192.168.1.3 And ...
0
votes
1answer
39 views

Connect to soap service via proxy on different ports

I need to connect from a server to a web-service server to consume a SOAP service but due to restrictions in place I cannot connect directly. They did however give me a proxy server that can, but it ...
4
votes
1answer
154 views

Setting up IPTables

I am trying to remove a router from our product and replacing all its functionality with the use of iptables. The system is required to perform general traffic control as well as forwarding data to ...
0
votes
1answer
60 views

Need help examining tcpdump file to block attack

I need some help, my game server has been under fire with DoS attacks for 2 days now. Bandwidth attacks are no problem since I host with OVH and they are filtered out but my game server ports are ...
0
votes
1answer
278 views

Block outgoing connections on RHEL7/CentOS7 with firewalld?

RHEL7/CentOS7 features a new firewalld firewall service, that replaces the iptables service (both of which use iptables tool to interact with kernel's Netfilter underneath). firewalld can be easily ...
0
votes
0answers
26 views

Is it possible to use iptables and trafficcontrol (tc qdisc) together to set rules on only specific packets/traffic?

I would need to set delay on my network interface such that only a specific set of packets/traffic is affected by this delay. i.e., I can set a 9 sec delay on eth0 tc qdisc add dev eth0 root netem ...
0
votes
1answer
36 views

PBR with iptables

I know question was answered multiple times, but this situation a bit different. So here is what I have: All users must user default gateway on eth0, except one That one must only use gateway on ...
0
votes
2answers
23 views

How to append mysql access to iptables

On one of my servers, I can see this: ACCEPT tcp -- distinct_server_ip anywhere tcp dpt:mysql By doing sudo iptables -L | grep distinct_server_ip And with ...
0
votes
2answers
258 views

Why won't iptables allow MySQL connections?

For some reason mysql connections from a specific IP address aren't allowed. This is the rule I have (grabbed from iptables-save): -A INPUT -s 12.34.56.78/32 -p tcp -m state --state NEW -m multiport ...
2
votes
1answer
47 views

IPTables custom log failing

I'm currently trying to split out some of my IPTables logging from kern.log into a file called iptables.log. Basically, I have several different adapters and I'm logging requests to port 80 on each ...
3
votes
2answers
86 views

How do I find out where my IPTables rules are being stored?

I working on a Debian server and I'm trying to figure out where my IPTable rules are being stored. From looking around on the internet I've found there is generally two locations were these are ...
1
vote
1answer
336 views

Ubuntu 14.04 LTE forward port to another port

I am looking for a way to forward 1 port to another internally. I have an Ubuntu 14.04 server on which I installed a game server that listens on port 25565. The game does not support multiple ports. ...
1
vote
0answers
123 views

Command to set dscp / ToS value on outgoing packets for OS X Mavericks?

I want to set a certain DSCP (or ToS) value on all packets sent over port 22. I have an iptables command to do so, but Mavericks only has the equivalent of pfctl and I can't figure out how to ...
1
vote
0answers
43 views

`ufw insert 1 deny to any` not working

ufw insert 1 deny to any ufw enable ufw status Status output: Status: active Logging: on (high) Default: deny (incoming), allow (outgoing), disabled (routed) New profiles: skip To ...
-2
votes
1answer
221 views

iptables destination ip and port

I am looking for a way to forward all traffic(to any port) from a pc to a certain ip. Looking at the rule below : iptables -t nat -A PREROUTING -p tcp --dport 443 --jump DNAT --to-destination ...
1
vote
1answer
956 views

Debian7 and tc qdisc issue : RTNETLINK answers: No such file or directory

I've been searching for few days now but couldn't find the solution to my problem. I have a VPS running Debian 7, and I have root access. I am trying to add some traffic shaping (using HTB), so the ...
1
vote
1answer
86 views

How do I forward localhost traffic to a remote host with iptables?

I would like to set up my CentOS 6.5 box to forward connections to localhost (127.0.0.1) to the same port on a remote machine (e.g. 10.0.3.10). I've tried the iptables rule below, but when I attempt ...