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)

2
votes
1answer
25 views

Yes-sayer as a target for port scanning

I want to test my iptables and prove that it only allows traffic for given Protocol / Port - combinations. Is there a tool that I can use as a target for a nmap port scan?
0
votes
0answers
18 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
28 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
31 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
49 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
21 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
24 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
26 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
11 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
21 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
20 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
23 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
54 views

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

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
21 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
14 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
36 views

Effect of firewall on virtual machine [on hold]

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
27 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
16 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 ...
49
votes
5answers
6k 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
30 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
40 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 ...
-2
votes
0answers
18 views

how do I get plesk running correctly on Ubuntu? [closed]

I have installed Plesk 12 with the autoinstaller from http://autoinstall.plesk.com/one-click-installer. The installation succeeded with "Congratulations! All stages of the installation/upgrade ...
-2
votes
0answers
10 views

Dual wan ubuntu router [closed]

I would like to configure a ubuntu server with two ISP and one lan with two network; say 192.168.1.1 and 192.168.2.1. 192.168.1.1 n/w should route through ISP one and 192.168.2.1 n/w should route ...
1
vote
1answer
39 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
11 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
23 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
24 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 ...
-2
votes
0answers
23 views

Fedora 21 Port Forwarding with firewalld (firewall-cmd); how does it REALLY work? Or, does it? [migrated]

Fedora's ability to forward ports using the apparently "native" networking software, firewalld, appears to continue to be broken beyond credulity. Please note that it hasn't really worked since at ...
-1
votes
1answer
35 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 ...
-2
votes
0answers
21 views

Postfix to Use Ipv6 on Rotation Basis [closed]

I want to setup my vps to use ipv6 on rotation basis and make ipv4 as incoming for postfix. i have 16-ipv6 address and 1-ipv4 address Need help in configuring the same in my vps. It has centos 64 bit ...
3
votes
3answers
157 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
13 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
25 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 ...
-1
votes
0answers
15 views

How to force users binding to specific IP, using IPtables?

I want to give some web users the possibility to have a dedicated IP, both for receiving and for sending. So it means a web script for WEB user XX, received by Apache on IP x.x.x.x, when opening ...
2
votes
0answers
52 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
60 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
10 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
41 views

Cannot acces Port 8443 of my Ubuntu server [on hold]

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
17 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
45 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
81 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
19 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
0answers
13 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
43 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 ...
-1
votes
1answer
60 views

trouble opening port 8080 on rackspace dedicated redhat linux [closed]

I have a server running apache on port 80, and I'm trying to setup nginx running on 8080 to setup/test nginx setup before switching out apache for nginx. I've never had issues opening a port before, ...
0
votes
0answers
38 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
31 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 ...
1
vote
1answer
99 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
28 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
49 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 ...