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)

-3
votes
1answer
186 views

How to set up port forwarding from Windows host to Vagrant Linux VM to Docker containers?

I'm using a Windows host, running CoreOS in Vagrant with VirtualBox provider, and in that CoreOS, I have Kubernetes 0.14.2 single-node cluster running (I couldn't get latest version, 0.15, to work ...
1
vote
1answer
33 views

IPTABLES -L OPTION NOT SHOWING SNAT RULE

I am able to get NAT to work using the following snat rule: iptables -t nat -A POSTROUTING -o em2 -j SNAT --to 192.168.2.2 My question is: Why is this rule not displayed when I issue the ...
1
vote
3answers
325 views

What is the best way to get PRECISE domain name from ip address logged in iptables log

In iptables I am logging certain public IP addresses... say of websites visited from different workstations, depending on destination port number... All this is not really relevant to the question but ...
2
votes
1answer
61 views

How to test iptables settings by port scanning? [closed]

I want to test my iptables and prove that it only allows traffic for given Protocol / Port - combinations. How I can use as a target for a port scan?
0
votes
0answers
72 views

How to set up Iptables SNAT with dynamically assigned public IP address

I am trying to set up a system to do NAT and other iptables-stuff (like logging, firewall, monitoring, etc.). The ISP provides a dynamic IP address and the DSL modem does NAT. I have the following ...
2
votes
1answer
129 views

Port 8080 remains closed even when opened with iptable and nodejs is listening on it [duplicate]

I am trying to install a nodejs server listening to port 8080 that I opened with iptable but when I run nmap or a web tools I always get the message that the port is closed. I'm on a Ubuntu vps. ...
0
votes
1answer
120 views

Route traffic through private IP for only certain hosts - CentOS 6.6

I am having a weird problem which I cant figure out - so I was hoping someone here could give me a hand. First off the end goal is that a specific server in my network runs an IPSEC connection to ...
1
vote
1answer
130 views

Chinese Firewall DDoS and IPtables not working

Recently my server has been hit with DDoS's coming from the Great Chinese Firewall. As per the advice in one of the replies in mod_security block requests by http-host header, and the advice in ...
0
votes
0answers
73 views

IPTABLES and GEOIP: Show Custom Webpage to Blocked Visitors

Because of legal protection, as a first stage of launching my project I will focus on couple of countries only. The number of supported countries will grow. I know, it is possible to block or allow ...
0
votes
0answers
203 views

How to configure iptables when running Docker

I have a difficult situation here, i have setup many containers on my docker host, running different applications like mailserver, databases, redis, and certain html applications using other ...
1
vote
2answers
32 views

iptables performance - iprange vs subnets

I want to allow a range of ip addresses - two /24 subnets, which don't fall under /23. I have two options: Use two rules with /24 masks and -s option Use single rule with -m iprange and specify ...
0
votes
1answer
40 views

Do I need to set rules for source and destination ports for outgoing rules on iptables?

I'm using puppetlabs firewall module and I'm having troubles setting up iptables for a simple web host. I'm following this guide and want to set up additional rules. ...
0
votes
1answer
27 views

Allowing all ports from an IP

I have successfully entered the following command to iptables sudo iptables -I INPUT -p tcp --dport 5000:5020 -j ACCEPT -m comment --comment "Allow Ports 5000s" However, AFAIK this allows access to ...
0
votes
0answers
56 views

How to allow applications in network namespace access to global filesystem?

I have several applications that are potentially high-risk and high-throughput (like bind, ntpd, etc.). I plan on having a "management domain" for OS tasks, updates, SNMP, automation, etc. and a ...
1
vote
0answers
42 views

iptables foward to multiple interfaces with NAT

I want to use iptables for provide NAT translation and forward the packets out a different interface. The network set-up is as follows: Alias: eth0:220 with IP address 10.1.1.220 / 255.255.252.0 ...
-5
votes
3answers
102 views

How I can Block all China to entry to my server [closed]

How I can Block China to entry to my server ? All China country ? By ipset and iptables I want by this to avoid DDOS attacks OS: CentOS 6.6 Thanks.
0
votes
1answer
29 views

Iptables - How can i limit the access of a service on a server with two ips?

On my personal server ( Centos 6.6 ), i acquired a secondary ip in order to keep all backend access splitted from the frontend applications. But i'm not sure how can i specify wich port can be ...
0
votes
1answer
50 views

accessing same domain name through a different port

I have a production website, and a development website. The must be accessed through the domain name, www.mysite.com. I would like to be able to access the dev site through a praticular port, say ...
1
vote
0answers
49 views

Effect of firewall on virtual machine [closed]

We have a ubuntu-12.04 host machine that has another ubuntu-12.04 guest machine running in it. The network interface between the two is bridged. I would like to put the host machine behind a firewall, ...
2
votes
0answers
67 views

Iptables content blocking firewall

I have setup a firewall with iptables to ratelimit connections based on content. The following is an example of one of my rules that stops wordpress bruteforce attacks. `iptables -A INPUT -p tcp -m ...
0
votes
0answers
60 views

KVM port-forwarding from ppp0 to VM's bridged NIC not working, but to VM's NAT NIC works?

I've spent a lot of time on this freaky problem, I've created a simple host and VM configuration to try isolate the problem. Terminology in this question Host: The bare metal server VM: The KVM ...
53
votes
5answers
7k views

I accidentaly forbid SSH connection to a remote server… What's next?

Let's say it again, we all make mistakes, and I have just made one. A brief history: I was doing some stuff on a VPS (Debian) I'm renting, when I noticed some strange behaviour. Using the netstat ...
1
vote
1answer
49 views

IPTables - Simple Routing of all traffic

Ubuntu 14.04.2 VM, with IP of 1.2.3.4 and 1.2.3.5. I'm trying to route all traffic for 1.2.3.5 to another address of 1.2.3.189 (which is on another server, and can be reached by any machine on the ...
0
votes
2answers
399 views

iptables block client ip internet access and keep LAN access

With the increase of appliances having network access and the potential for hacking, I want to block specific ip address from accessing the internet, but allow LAN access. For instance, I use a ...
1
vote
1answer
882 views

systemctl throwing errors on start/enable after package instal [duplicate]

In the effort to lock down a new Centos box I am building I am installing iptables. I would like to be able to put this in a script so I can do this to other boxes but I am getting some odd errors ...
0
votes
0answers
47 views

Centos internet sharing with dual WAN and subnet routing

Situation is like this: eth0 has internet access with VPN for 2 subnets 192.168.2.x nad 192.168.30.x eth1 has internet access eth2 is the one to be the connection to allow internet connection ...
0
votes
1answer
67 views

Return OpenVPN Internet clients' traffic to non-default gateway

At home I have an OpenVPN server which is at the same time an OpenVPN client. The purpose is to share one foreign IP address between several devices. In the local network everything works fine since ...
3
votes
1answer
34 views

Is the use of the RELATED state in iptables used properly?

I have been seeing many people using the ESTABLISHED and RELATED flags together to ACCEPT traffic through once a connection was previously accepted (see Allowing Established Sessions). Say I setup my ...
-1
votes
1answer
64 views

what is wrong with this rsyslog configuration?

I am trying to get rsyslog to log to the following custom log file /var/log/iptables.conf instead of syslog. Iptables has got logging enabled, here is an example log line outputted from iptables ...
3
votes
3answers
175 views

Iptables rules with ! character

I have entered iptables rules to log a specific connection on our server, but it doesn't seem to be working as I want it to. Here are the rules: 1 LOG tcp -- !10.51.0.0/16 ...
0
votes
0answers
21 views

Syslogd acctack

My hosting company told me, my VPS server (CentOS release 6.6) have abnormal activities issue (hacking other server) and blocked my outgoing traffic, they just give me limit info: The hacking ...
1
vote
1answer
67 views

How do I get firewalld to restrict access to all except specified IP addresses?

I would appreciate some assistance with configuring firewalld please. Here's a bit of background. All I want to do is prevent all access- except whitelisted IP addresses to a web application running ...
2
votes
0answers
114 views

How do iptables work with NFQ in terms of traffic shaping in snort?

I'm trying to understand how iptables and NFQ work together with snort. The reason that I ask this is because from what I understand snort can be set to IPS via NFQ but if you have iptables there ...
0
votes
1answer
128 views

ipTables IP Range will not be blocked

I have setup fail2ban with this Tutorial http://wireflare.com/permanently-ban-repeat-offenders-with-fail2ban/ and it seems working. But the attackers are changing their IPs and thats why I decided to ...
0
votes
1answer
38 views

Secure elasticsearch but allow remote CRUD

I'm going to run a bit of software on server A to add and remove entries from elasticsearch on server B. How can I allow these remote create and delete operations, but still keep ES secure? Is ...
0
votes
1answer
99 views

Cannot acces Port 8443 of my Ubuntu server [closed]

I try to connect to my Ubuntu server over port 8443 using nmap. PORT STATE SERVICE VERSION 8443/tcp closed https-alt As you can see to the outer world the port 8443 appears to be closed. ...
0
votes
0answers
26 views

iptables, after specifying an interface to drop traffic it drops all traffic of all interfaces

We have currently the situation that one interface (eth0) is linked to the internet. and we 2 other devices (eth1/eth2) for management purposes. Now the idea is to block off eth0 completely from the ...
0
votes
1answer
95 views

Setting up iptables filter to allow Git

Sorry I am new at this server stuff, so bare with me and if I'm missing any info let me know! I'm trying to setup my Ubuntu 14.04.2 LTS server to have a solid iptables firewall. Right now I think it ...
-1
votes
2answers
122 views

iptables rule to send email

I have to send emails (and only send, not receive) from a linux server (SUSE Linux Enterprise Server 11) and I think I should add kind of the following rule to the iptables: iptables -A OUTPUT -p ...
0
votes
0answers
37 views

Increase Max prefix length for --log-prefix in iptables

I am using centos and iptables complains about the Max prefix length which is 29 for --log-prefix option. How can I increase this limit?
0
votes
1answer
44 views

OpenVZ container(s) and NAT

I have been trying to days to solve my NAT issue with OpenVZ. I have used their guide on their website/wiki, however I just seem to be unable to get it to work. My Linux box is running on CentOS 6 ...
1
vote
2answers
46 views

How do I drop requests from dig?

Basically I'm getting tons of request to my named/bind service, basically those requests are being rejected by named, Those are the messages i get, from tons of ips., How extacly can I drop those ...
0
votes
0answers
122 views

Source IP rate limiting in iptables: hashlimit vs recent

I want to perform rate limiting per source IP in iptables. For example, limit the rate at which a host can establish new SSH connections to 5 per minute. To my knowledge there are two ways of doing ...
0
votes
1answer
61 views

Why is port 443 (but not port 80) being exposed to nmap when iptables is configured to drop the traffic?

A Debian box is running web services on ports 80 and 443 and iptables is configured to allow web traffic only from white listed ip addresses. A second Debian box (that is not white listed) is using ...
2
votes
1answer
517 views

Docker - Exposed ports accessible from outside - iptables rules ignored

I have a docker container running like: docker run --name some_container_1 -p 8080:80 -d some_image Which works fine. The container exposes it's port 80 to 8080 and is accessible from localhost. ...
-2
votes
1answer
39 views

How to implement iptables using Puppet

i would like to implement these rules below in puppet from puppet master to clients Could anyone help me to get the script for this iptables rules, and in which file we want to have this below ...
0
votes
2answers
96 views

Redirecting RDP (port 3389) with iptables

I have a Debian server with an IP 10.10.10.5 and a Windows computer with an IP 10.10.10.7. My plan is to make the Debian server forward all RDP traffic to the Windows computer with these iptables ...
1
vote
1answer
65 views

iptables KVM prerouting SMTP

I have a host machine that has to manage traffic on port 25 and route to port 25 on the KVM machine for postfix deamon like this scheme: WAN --> (25) HOST_MACHINE --> (25) ...
0
votes
2answers
145 views

Ubuntu Iptables Dual Wan - Forward wan 1 & 2 to an internal server

I'm having problems configuring iptables rules on a double wan setup. The OS is Ubuntu 12.04 LTS. I have 2 Wan connections, both with static IP. Wan-1 is on eth2, Wan-2 is on eth4. I want both of ...
1
vote
0answers
143 views

Virtual IP Pool for NAT with StrongSwan VPN

I'm trying to wrap my head around a site-to-site VPN configuration using StrongSwan that will allow remote sites to connect to our AWS VPC. The catch is, the remote gateways will potentially be using ...