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
24 views

iptables string match accept connection

With iptables I setup these rules: -A INPUT -s *my.ip.address*/24 -p tcp -m tcp --dport 80 -m string --string "/test.php" --algo kmp -j ACCEPT -A INPUT -p tcp -m tcp --dport 80 -j DROP When I go to ...
0
votes
2answers
53 views

iptables: POSTROUTING rule not matching with mark

I have a host that sends packets to virtual machine say on 192.168.0.1/24 with either 192.168.0.11 or 192.168.0.12 as the destination IP. I'm trying to set up the virtual machine as a NAT. It routes ...
0
votes
1answer
75 views

What are the implications of using a default DROP rule on a public DNS server

RHEL 6.6 authoritative DNS server. Right now in IPtables I have the INPUT chain defaulting to ACCEPT. :INPUT ACCEPT [0:0] I have been having some issues with it being attacked lately and I am just ...
1
vote
0answers
56 views

How to forward one ip to another using iptables on android [closed]

So if got iptables on android. There is an app on my phone which connects to a malicious hardcoded ip (lets call it 192.168.100.1) and sends some data. I want to redirect all http traffic to that ...
1
vote
1answer
27 views

TFTP for libvirt hosts behind NAT

This has taken me all day to work out, so I thought I would get this recorded here! I have a LibVirt host with NAT instead of bridging for the hosted virtual machines, using the default IPTables ...
1
vote
1answer
50 views

How to re-open the port?

I've a server with root access, I opened the 4022 port for ssh and it was working very well before, Today I try to connect on my server via ssh, but nothing happened, so I checked that via nmap and ...
1
vote
0answers
15 views

iptables match output rule for supplementary groups

The iptables utility allows for rules to match based on the process's uid or gid with the following: sudo iptables -A OUTPUT -m owner --uid-owner root -j ACCEPT I also want to add a rule to allow ...
0
votes
0answers
21 views

Linux Iptables Nat with two gateway

I got a CentOS server in a DMZ that act as a DHCP and DNS server with the following network configuration: eth0 IP: 192.168.100.50 SN: 255.255.255.0 GW: 192.168.100.1 Now I added a seconde network ...
0
votes
1answer
53 views

Port knocking: Hide UDP port from scanners

I am interested in using port knocking to strengthen security of a private server on the internet. I was unhappy with implementations that most commonly shows up on the internet (where a sequence of ...
0
votes
0answers
25 views

block more fragmented packet using iptables

I am trying to stop all MF flag packet which has more fragment big set. because i have seen many IP Frag attack taking advantage of it. I know its not a good idea to do but, I have test my application ...
-2
votes
1answer
64 views

Hide my Linux machine from traceroute but still allow ping [closed]

i have a linux server running RedHat and i want to make it pingable but invisible to traceroute/tracert. i set some iptables rules but whatever i try is either block or allow both ping and traceroute. ...
0
votes
1answer
21 views

IPTABLES ban ip if more than X conn per second

I'm creating a small firewall with iptables that limits the max simultaneous connections per IP to 40. So this is my situation: iptables -A INPUT -p tcp --syn --dport 1234 -m connlimit ...
0
votes
1answer
26 views

AWS NAT instance as OpenVPN Client can't route instances behind it

I have an Amazon AMI 2015.09 instance as a NAT server for my backend servers. I have configured the OpenVPN client on this same box, the NAT server is able to talk to everything over VPN, all ...
0
votes
1answer
27 views

Am I able to change source and destination IP address on packet when output source depends on input destination IP?

I have a Linux server which is used to change the source and destination IP addresses. I was trying to set it up so it accepts packets with an destination IP of X.X.X.11 - X.X.X.15 and changes any of ...
2
votes
1answer
37 views

Docker container can't communicate with etcd

I created 3 coreos machines at digitalocean using this cloud-config.yml: https://gist.github.com/socketwiz/d6fe23d19180a1ad8b5a where token was replaced with the one I retrieved from: $ curl -w "\n" ...
0
votes
2answers
44 views

iptables REDIRECT works only for first packet

i need to redirect all UDP packets with destination port 15000 to port 15001 if the packet contains for example the string test. i have these two simple rules: iptables -t nat -A PREROUTING -i eth0 ...
0
votes
0answers
10 views

One-to-One NAT with Firehol

I use firehol to manage iptables on Ubuntu 12.04. I am trying to set up one-to-one NAT so requests from the internet and my LAN to one of my public IP addresses goes to a specific server. Here is what ...
0
votes
2answers
61 views

How to open the MySQL port only to Amazon RDS for replication?

I have a MySQL database on a dedicated server, that I want to replicate to Amazon RDS to always have an up-to-date backup. For this, Amazon RDS needs to be able to connect to my master MySQL server. ...
0
votes
1answer
31 views

Why are duplicated UDP packets being dropped 10 out of 11 times by this iptables configuration?

I am trying to duplicate UDP packets flowing to port 50007 on an Internet address from devices on a local NAT network (192.168.12.0/24) with the intent of processing them locally (on ...
1
vote
1answer
58 views

SELinux and iptables on a firewall / router

I've come to a point where I need to migrate to a new server. Though I'm aware of the SELinux advantages, is it necessary to keep SELinux enabled when the firewall / gateway is only meant to route ...
1
vote
2answers
82 views

Firewall rule to only allow Postfix to send email through SMTP on port 25

As suggested in How do you detect a spambot on your network? how can I setup firewall rule to allow only Postifx to send emails using SMTP on port 25 and disallow all other applications to send on ...
0
votes
0answers
17 views

Iptables is installed but can't be found

root@kathpota:~# systemctl status iptables ● iptables.service Loaded: not-found (Reason: No such file or direc tory) Active: inactive (dead) root@kathpota:~# iptables -V iptables ...
2
votes
2answers
159 views

Layer 3 routing based on HTTP packet content

I'm running a HTTP proxy service and want to route traffic to various Layer 3 TUNs based on the contents of HTTP packets (e.g. HTTP headers). I'm using BSD and Linux to do this but it doesn't look ...
1
vote
0answers
27 views

What would be the cause of openvpn network fault?

We have openvpn network for aproximately 1200 client connections. Basically everything is running fine but there exists 0-4 collapses per day (which occurs randomly), when we looses majority/all of ...
1
vote
1answer
56 views

Redirect one public IP to another public IP, different subnets and servers

That's my first question here so I hope I'll structure it right. Since it is a case for a friend, I'll appreciate guideness for a proper setup because I won't be able to access the environment. In ...
0
votes
0answers
24 views

i see an open udp connection on port 50113 on server

I just setup a new server and see an established connection on port 50113 (udp). I do not recall setting up anything on the server that would require port 50113 (tcp or udp). I have ufw/ip tables - ...
0
votes
0answers
80 views

How to force haproxy http to close connection with client?

I have a backend that performs some analysis of JSON data and if client's data is invalid I have to ban client. My backend use ipsets and iptables rule, but in order to make these rules work I must ...
0
votes
0answers
9 views

IP Table settings not allowing IP SSH access [duplicate]

I have set up a knockd server on a virtual machine "192.168.56.101". I have set up IP table rules to block access on the SSH port (22). Now, when I execute the following command (on knock success), ...
1
vote
1answer
92 views

How to enable transparent HTTP/S redirection through proxy using iptables?

My current setup consists of the following elements: A router flashed with OpenWRT with two interfaces: eth0 is the access to the gateway and eth1 manages the local network (192.128.2.0/24) A box ...
0
votes
0answers
18 views

Read packet counter from iptables for a specific rule

I have a box where forwarding rules are being created and deleted all the time using iptables. The box can have more than 5000 rules. I want to read the packet counter for a specific rule using ...
0
votes
0answers
108 views

(PCI-DSS, APF) Firewall UDP Packet Source Port 53 Ruleset Bypass?

I am handling vulnerabilities reported by a PCI-DSS scanner, and one of them is new to me: Title Firewall UDP Packet Source Port 53 Ruleset Bypass Synopsis: Firewall rulesets can be ...
0
votes
0answers
43 views

Apache mod-security - Deny access from IP addresses listed in a blacklist file

I want to deny access from IP addresses listed in a blacklist file (not realy matters, but the file is /etc/csf/csf.deny). This is my custom rule (at the moment..): SecRule REQUEST_URI ...
0
votes
0answers
14 views

Iptables vm no outbound connections

I'm currently running Proxmox with a couple of vms. Unfortunatly i only got 1 public ip so i tried to work with nat. Problem is, i can't get outbound connection from my vms. Inbount connections to the ...
-1
votes
1answer
29 views

IPtables log only some drop connections

I have these rules: -A INPUT -m limit --limit 2/min -j LOG --log-prefix "IPTables Packet Dropped: " --log-level 7 -A INPUT -j DROP But this logs every DROP that occurs like IPTables Packet Dropped: ...
0
votes
1answer
60 views

Iptables rules for transparent proxy, and no proxy

Hi I'm using redsocks and iptables port redirection rules to set a transparent proxy, and works fine, but I need to establish iptables rules for non proxy access, to domains, domain1.com and ...
0
votes
0answers
24 views

iptables, Apache2 and cgi

I'm running Perl cgi script providing some reports on Apache webserver on a host behind DSL modem doing port forwarding. Overview: net <-> DSL_Modem (192.168.1.254) <-> Ap2host ...
0
votes
0answers
10 views

debug connection to other server

My server suddently is unable to connect to other servers through Curl, file_get_contents etc. This issue is reported for at least 5 different server Ips. Whereas it still works with many others. ...
0
votes
0answers
25 views

How to alias default gateway IP address

The problem is the following: I have got two dedicated servers at OVH. I have got few virtual servers (KVM+libvirt) and I want to migrate them between two hosts. I already managed to make live ...
-1
votes
1answer
68 views

How to block certain IP address to access certain domain/IP via iptables in Linux?

How to block certain IP address to access certain domain/IP in Linux ? I have CentOS installed on my server for virtual server purposes. I have a few virtual servers clients each one with his own ...
2
votes
1answer
47 views

fail2ban rules not coming into effect

I have installed the Apache web server on a stock installation of Ubuntu 14.04, and I am trying to use fail2ban to block requests that check for vulnerabilities. I have put the following in ...
0
votes
0answers
21 views

OpenWRT reroute all router traffic through a Client

I have an OpenWRT router (192.168.1.1) with various wired and wireless clients (192.168.1.x). One of the clients is a Suricata Sensor (192.168.1.100) with only one, 1000MBbit NIC. I want to ...
0
votes
1answer
34 views

CentOS 6.5 Apache redirect to 127.0.0.1

I have to install a new CentOS Server v6.5 I already install httpd and want to access Apache Welcome Page by serverIP. But I get a timeout, so I stop iptables service for a moment. Now I get an 301 ...
0
votes
0answers
9 views

iptables avoiding chain's rules on nat table

I have lots of SNAT rules on HTTP (port destination 80) traffic in my POSTROUTING chain of the nat table. I'm trying to reduce the processing cost by adding a rule that filters out the non-HTTP ...
0
votes
1answer
16 views

Connect to mongodb through ssh

I'm not sure if it's related to this one, but I have a similar problem. The problem is unless I have port 27017 opened, Robomongo fails to connect even with "ssh tunnel" option. Port, address and ...
2
votes
1answer
93 views

Linux noob here. RHEL v6.7. Iptables default configuration. Not secure, right?

Thanks for having me! So... I did a fresh install of RHEL v6.7. I was setting up just NTP service and followed some tutorial on the interwebs. At some point is this tutorial it suggested that I ...
-2
votes
1answer
52 views

How to access the web page using specific port?

I created two directories for storing the website on the web server /web /web/admin Assume that my website domain is http://www.domain.com/ and I would like to using the port 8080 for the admin ...
0
votes
1answer
38 views

psql: could not connect to server: Network is unreachable

I know it is a duplicate questions but their solution not working, What I'm doing is, connecting to a remote Postgresql database from my local ubunut machine: psql -h x.x.x.x -U username But it ...
0
votes
0answers
13 views

Ban Incoming IP from PRC using Iptables/Firewalld

I was DDos Attacked by Chinese Great Firewall twice this year. Now I download zone file from http://www.ipdeny.com/ipblocks/ .I want to do these things: If Someone from Anywhere wants to connect to ...
0
votes
1answer
50 views

Amazon Linux - iptables NAT rules not matching GRE traffic

I'm trying to prototype something in AWS VPC/EC2, but I can't get my NAT rules to work. I have the following setup (all instances running the Amazon Linux AMI): GRE Tunnel between instances ...
0
votes
1answer
21 views

Iptables rules, how to allow another server IPs

I have 5 ips 1.1.1.1 1.1.1.2 1.1.1.3 1.1.1.4 1.1.1.5 i already install openvz & openvz webpanel in main ip then create a vps with ip 1.1.1.2 i cant open 1.1.1.2, but if i disable iptables ...