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)

0
votes
0answers
28 views

Route port to other host:port inside Docker

I'm running code inside Docker that has a hardcoded server set to localhost:27018, which I'm trying to redirect like this, but it doesn't work. targetip=$MONGOTARGET_PORT_27017_TCP_ADDR sysctl ...
1
vote
1answer
45 views

Linux limit connections on a specific port

I am following iptables connection limits to limit the amount of connections the server can get on port 80. For instance I tried: /sbin/iptables -I INPUT -p tcp --syn --dport 80 -m connlimit ...
5
votes
4answers
148 views

Route IP Traffic Based on Process to Different Default Routes / Interfaces

I'm trying to determine if it is possible to selectively route IP packets from a process or process group through a specific interface while all other packets are routed through another interface. ...
0
votes
0answers
23 views

OpenVZ: Node iptables doesn't append rules

I want to make a set of rules on iptables inside of a node, but it seems that the iptables isn't appending all the rules or somehow and kick me out everytime I run the following script (I'm using this ...
0
votes
1answer
64 views

NAT routing based on DNS name (reverse TCP proxy?)

Introduction I have one router, running pfSense (can be anything since it's a virtual machine on VMware, so if the solution requires anything else, that's fine by me) and behind it I have multiple ...
1
vote
1answer
49 views

iptable rule and iftop command

Someone is flooding our server with UDP packets. I simply put iptable rule to block that IP. However, when I run iftop command I can see a huge traffic coming to my server. When i looked for iptables ...
0
votes
0answers
20 views

iptables — capture pptp connection attempt packets and place into holding pattern

Problem I have a problem of too many simultaneous connection attempts to a vpn server causing all connections to drop. Staggering connection attempts fixes problem. How can I use iptables to do the ...
0
votes
0answers
21 views

Android: redirecting self-bound traffic

I'm using an Android emulator hosted on a linux machine. It has an application that is sending packets towards the emulator itself (using ip 10.0.2.15, see here) that I want to redirect towards ...
0
votes
1answer
48 views

What is timestamp format of iptables recent proc-file?

I want to understand meaning of records in /proc/net/xt_recent/ip_list file (which is created by recent extension of iptables), e.g: src=127.0.0.1 ttl: 128 last_seen: 4298627364 oldest_pkt: 3 ...
0
votes
1answer
58 views

Distributing Internet equally among several users [closed]

I have a very basic setup which follow the following diagram - [ISP] === [Linux Home Router] ==== [Client1 .. n] Internet sharing is working without any problem. But the main issue is that if any ...
1
vote
2answers
59 views

Forwarding of a specific port

I tried forwarding a specific ip:port to a specific ip:port on a linux machine. I used iptables with the following command: iptables -t nat -A OUTPUT -p tcp -d 10.0.2.5 --dport 80 -j DNAT ...
2
votes
1answer
64 views

Protecting against a DOS attack

Someone is DOSing my server. It is not a DDOS attack as there is only one server involved in this attack. I simply put following iptable rule to drop all the packets coming from the attacker: ...
1
vote
1answer
46 views

route traffic directly without vpn while the vpn still connected

I have a box with fedora, connected to vpn, forwarding done by iptables, every thing is fine, and it is always connected, vpn interface is ppp1, connected through the pppoe interface: ppp0, but ...
0
votes
0answers
66 views

/etc/network/if-pre-up.d/iptables script makeeth interfaces disappear in debian jessie?

I need to enable NAT on my VM in iptables. I followed official debian instruction to configure it: First of all, i created /etc/iptables.rules file with following content: *nat -A ...
1
vote
1answer
29 views

Netfilter : invalid state for proxy through VPN

I have an OpenVPN between my box A, and the remote server B (both Debian jessie). On server B, I also run Squid3. I then configure my A-browser to use the remote proxy with the VPN address of the ...
1
vote
1answer
32 views

Can't change source IP address (to floating ip) for udp outgoing packages

I'm having trouble getting a cluster to work using pacemaker and corosync. Here is my hardware configuration: Network: 192.168.3.0/255.255.255.0 Gateway: 192.168.3.1 node1 (Ubuntu Server 12.04 x64) ...
0
votes
2answers
69 views

do i need to filter the OUTPUT with iptables for a dedicated firewall box?

I already know how to setup a firewall using iptables, but after a visit of the IT Security Department, they said i need to filter the OUTPUT, but, it is pointless to me, i really can find an scenario ...
0
votes
0answers
17 views

Can't stop the UDP packets [duplicate]

My datacenter has stopped my cloud server because my server is producing excessive UDP traffic. I have run: tcpdump -i eth0 udp and following is a sample set of log. 13:09:42.789583 IP ...
1
vote
1answer
38 views

Blocking illegal traffic to a vps using ufw or/and iptables

I am totally new in this, and I didn't know how to phrase my question title, so it might not be that accurate, forgive me on that matter beforehand. I'm getting some strange requests in my apache ...
2
votes
2answers
172 views

Trying to connect to servers in a remote lan with softether vpn client and iptables nat ip_forwarding

I have implemented a softether vpn server on one aws server connected to other instances in a LAN. I can ssh into the server with ssh myname@10.0.1.10 without problem. I followed this guide My goal ...
0
votes
1answer
26 views

Caching UDP packets with iptables

I have a server set up to forward all of its packets on a certain port to another host with the following command; iptables -t nat -A PREROUTING -p udp --dport PORT -j DNAT --to-destination IP:PORT ...
0
votes
0answers
6 views

iptables presale me to ssh access or calling methods remotely [closed]

I have a linux OpenWRT unit and I can't make an ssh connection after running iptables -F. If I iptables -L -n -v, I find several rules that are automatically inserted and it prevents me from doing ...
0
votes
1answer
49 views

How to block all traffic which is headed to a particular domain

I have recently added an IP address to my VPS. The problem is that the previous owner has abandoned the domain name with its nameservers set on this IP. Although any access to this domain is denied by ...
0
votes
1answer
49 views

iptables hashlimit memory usage: What is the difference between --hashlimit-htable-size and --hashlimit-htable-max

I'm looking to use iptables hashlimit to limit abusive web crawlers, much like this question is trying to limit ssh bruteforce scans. Every once in a while they hit an inefficient code path on our ...
0
votes
2answers
56 views

How to block DHCP traffic using iptables

First let me describe my environment: There is a VM (CentOS) acting as a gateway The gateway VM has to NICs, eth0 connects to public network, eth1 connects to private network eth0 get IP from public ...
0
votes
0answers
34 views

ip rule not acting on fwmark

I'm trying to use iptables to load balance web traffic over multiple DSL lines by marking the packets and routing based on the mark. I'm working with CentOS 6.6, Kernel 2.6.32-504.16.2.el6.x86_64, ...
0
votes
1answer
94 views

SSH Connection refused after modifying iptables

Yesterday night I was messing with my iptables doing this specific commands: sudo iptables -F sudo iptables -X sudo iptables -P INPUT DROP sudo iptables -P OUTPUT ACCEPT sudo iptables -P FORWARD DROP ...
0
votes
1answer
29 views

networking port forwarding to ssh tunnel

I have a quick question regarding Linux port forwarding to an ssh tunnel. A ssh (reverse) tunnel connected to a web service on one machine is terminated on one machine, such that the service is ...
7
votes
2answers
254 views

Debugging iptables and common firewall pitfalls?

This is a proposed Canonical Question about understanding and debugging the software firewall on Linux systems. In response to EEAA's answer and @Shog's comment that we need a suitable canonical ...
6
votes
1answer
104 views

iptables command from RHEL documentation for cobbler, fails in RHEL 7

This seems like a very simple question. But I don't see anything much about it on the web. The command comes from the RHEL documentation itself, so I would expect that it works... and yet it fails. ...
3
votes
1answer
57 views

Fail2ban redirect

I've just finished setting up fail2ban on my Centos reverse proxy server. I was able to get it to block all requests if a certain criteria was met (pretty straight forward). However, I'd now like ...
0
votes
1answer
47 views

How to set up iptables on a gateway that also hosts Squid proxy?

I have a computer that serves as: a) a gateway between a wireless network (WLAN0) and a LAN (ETH0) connected to internet b) a Squid3 proxy server that does only web filtering (no caching) I have ...
2
votes
0answers
20 views

Test if iptables would pass a given ip/ip-range [duplicate]

I am currently trying to debug problems relating to our firewall configuration and found myself in the situation where I would like to test a config. Ideally I would like to take the iptables config ...
0
votes
1answer
144 views

How do I block all BlazingFast.io IP ranges?

In my logs I've been noticing several cases where frequent requests from an IP spam POST requests to a specific Wordpress script. What all of these spam source IPs have in common, is that they ...
0
votes
1answer
72 views

iptables slow down connections

When I enable iptables (v4/v6) for my server, every connection like ssh, imap, smtp, http, https and so on are slow down so if I try to connect to ssh, it tooks up to 30 (!) seconds. The imap service ...
0
votes
2answers
47 views

Clear TCP sessions

I am trying to use iptables to reject packets as well as reset the TCP connection. My rule is: iptables -I FORWARD -p tcp -s 10.0.0.10 -j REJECT --reject-with tcp-reset If 10.0.0.10 is SSH'ing into ...
1
vote
3answers
42 views

Ubuntu / iptables: Using a server as middle-man to talk to firewalled server [duplicate]

I have a situation where I need to communicate with an API that only allows connections from one particular IP. So api.example.com accepts connections on port 443 from whitelisted-ip I want to be ...
0
votes
0answers
53 views

Linux router for 2 public subnets with one getaway and one local subnet - not load balancing ;)

I have problem with routing on linux. My ISP give me 2 ranges of public addresses, lets say: 192.168.11.0/30 (4 addresses) - router 192.168.33.0/29 (8 addresses) - servers additionally I have on ...
0
votes
3answers
53 views

iptables actively refused everything despite exceptions

I was following the centos wiki page on iptables but no mater what I change only port 22 opens. Using various port scanning websites they all say the server is actively refusing connections on all ...
2
votes
1answer
47 views

How to count packets coming from outside using iptables? [duplicate]

If you don't give iptables a target, it simply counts how many bytes and packets match the rule. I'd like to count all packets that come from outside, i.e. don't match 10.0.0.0/8 and don't match ...
0
votes
0answers
58 views

IPtables string module

I am running 2 Apache servers behind a load balancer. I do not have access to the load balancer as it's run by our hosting provider. I am tasked with maintaining a blacklist of IP addresses that have ...
0
votes
0answers
79 views

Route postfix through different ISP/Gateway

Our network has 2 different gateways/ISPs, one with a dynamic IP used mostly for web traffic and SQUID and another with a dedicated connection and a static IP to handle VOIP and email. The network ...
0
votes
0answers
38 views

Cannot trace bug in iptables firewalls config

I seem to have a bug in my iptables configuration - when I comment out hte final line (drop) it works fine - when I uncomment it, I cannot ssh into my server - can anyone spot what I'm doing wrong? ...
0
votes
0answers
19 views

l7-filter does not set markers

I install l7-filter userspace on ubuntu 12.04 and run it by this command: sudo l7-filter -f /etc/l7.conf -q 1 but l7-filter does not set any markers. I set iptables to send forwarding packet to ...
0
votes
1answer
37 views

Iptables drop forwarded traffic destined for interface IP address

I have a small VPN setup where I use IP tables to nat traffic coming in the vpn0 interface to the IP address of the eth0 interface. These rules look like this: iptables -t nat -A POSTROUTING -o eth0 ...
0
votes
1answer
195 views

ntpd error: unable to bind to wildcard address 0.0.0.0 - another process may be running - EXITING

I have a problem. Time on server not synchronized. And it seems that this problem was appear after I set my rules for iptables, which I described here May be I'm wrong and these two events are not ...
0
votes
1answer
28 views

IP6Tables: How to enable external access to MySQL?

How to enable external access to MySQL with rules on ip6tables? I have tried to the rules below, where after inserted I get access, but when server restart the access remains blocked. :INPUT DROP ...
0
votes
1answer
82 views

Starting to learn about IPtables, why do I need this rule?

I have been reading all day about IP tables, how the rules work, sets of rules for basic webservers, etc. Now I`m trying to configure my webserver with IPtables using this thread as a starting point: ...
0
votes
1answer
93 views

Can iptables automatically drop established session after certain seconds?

Can iptables drop automatically an established output session after certain seconds e.g. 30 sec. since its launch? But I want to restrict it only for destination port 80 and 443. The purpose is to ...
0
votes
1answer
33 views

IPTables forwarding no more connection

I have a VPS for protect windows server from DDOS so I have forwarding connection. The forward works great but I can't access to the internet with the VPS. Ping doesn't works and I can't update or ...