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
votes
1answer
10 views

how to configure fail login delay using iptables

Like in Subject, I need to set particular delay i.e. when wrong password is provided. I can't use PAM. Thanks for any help.
0
votes
0answers
15 views

How do I ban IP's that request files that do not exist using fail2ban? [duplicate]

I have recently started using Fail2Ban and need to configure a specific 'Jail'. My apache error logs are filled with requests for files within my /var/www folder. The folder doesn't contain any ...
0
votes
0answers
18 views

Ebtables to setup forwarding and nat

I would like to use ebtables to perform the following 2 things without using bridge-utils SCENARIO I: I would like to forward all the packets received from eth0 interface onto the eth1 interface. ...
0
votes
0answers
25 views

telnet cannot connect to port without firewall

If I try to connect to MySQL with telnet myhost.com 3306 I get a network not reachable error, even when I flush all iptables rules. I can reach other ports like ssh (with the same iptables rules ...
0
votes
0answers
17 views

Setting up Squid Transparent Proxy on a machine separate from the router

The context would be like this: Router Machine runs CentOS 6.0 with iptables policies applied. WAN interface is eth0. Interface eth3 connects the network that contains the proxy server, and eth2 is ...
0
votes
0answers
12 views

Traffic accounting with iptables with multiple chains

I have a linux firewall setup with 3 zones: - green for LAN (192.168.0.0/24) - blue for WLAN (192.168.1.0/24) - orange for DMZ (192.168.2.0/24) All zones have systems running and I want to know what ...
1
vote
0answers
33 views

openvpn TLS handshake fails on client because firewall drops packets (but why?)

I seem to have problem with my openvpn server - client connection. now, the important information is in the log (verb3) of my client: Mon Mar 30 17:09:59 2015 OpenVPN 2.2.2 ...
2
votes
1answer
174 views

Can't access domain internally via public IP address [duplicate]

I have a dedicated server running Proxmox and a VM inside Proxmox running Debian 7 (Wheezy). As I only have one IP address, I'm using iptables to forward ports to the VM. My ...
0
votes
0answers
13 views

Modify iptables rules when docker container has started

On my debian host I have a few docker containers, which I ran with -restart=always so, they start after host has rebooted. Some of them have exposed ports, and docker host process adds certain ...
-1
votes
0answers
20 views

iptables logging dropped packets per minute

what exactly does this mean: iptables -A LOGGING -m limit --limit 2/min -j LOG --log-prefix "dropped: " --log-level 7 Does the 2/min mean it will only log any dropped packet twice per minute? Or ...
-1
votes
1answer
32 views

Device cannot connect to server, iptables [on hold]

I setup iptables on a controller server that a device communicates to. However, the device is reporting connection refused in its logs. On the controller server, i'm not seeing any packets blocked for ...
-1
votes
1answer
34 views

I have docker installed - how to edit iptables of machine?

On a machine that has docker installed, I am doing a sudo iptables -L, and get: root@dockertest:~# iptables -nvL Chain INPUT (policy ACCEPT 8364 packets, 729K bytes) pkts bytes target prot opt ...
-2
votes
3answers
22 views

Web server is working, but ping returns a request timeout for icmp_seq [on hold]

these are my current iptables settings: Chain INPUT (policy DROP) target prot opt source destination ACCEPT all -- anywhere anywhere state ...
-5
votes
1answer
32 views

IP Rotation using iptables on OpenVZ [duplicate]

I want to set IP Rotation using iptables so I am using below code.My server Virtualization Type is OpenVZ. My server provider has enabled all the options then also don't know what is the wrong, It is ...
0
votes
0answers
4 views

How to enable ping between machines connected in two interfaces? [migrated]

I have a linux board with two ethernet interfaces as mentioned below. eth0 connected to another linux machine (ad-hoc) eth0 on board 191.168.1.2 connected to Linux machine 192.168.1.3 eth1 on board ...
0
votes
3answers
44 views

What is the most effective way to block IP address in Application Layer?

I understand that most Routers/Firewalls are able to block IP tables in the network level. IPtables for instance is quite effective. However, I want an application layer IP block.I have an HAproxy ...
1
vote
1answer
25 views

Route new outbound traffic

I am looking for some iptables rules which can help me to route some traffic from a server : Client 1 ----| Client 2 ----| |----------| Client N ----| ssh, ...
0
votes
1answer
21 views

Loading fail2ban rules to iptables using iptables-persistent

I am using iptables-persistent package to reload my iptables on boot. And I have been thinking should I add the fail2ban rules to the loaded config file? Now I am seeing they are duplicated. This is ...
1
vote
1answer
42 views

Amazon EC2: OpenVPN server won't route bridged packets from client to VPC subnet

I have a bridged OpenVPN setup on a Linux server in an Amazon EC2 VPC. (Spent hours on docs, reading similar problems, here, openVPN forums, no luck yet.) The bridged interface is up and contains ...
0
votes
0answers
28 views

Forwarding ports and traffic to VPN tunnel

I've installed OpenVPN on my VPS. I have one question: how to forward traffic going to that VPS to go to VPN tunnel created with my local PC. I will use TCP connection. The whole traffic will be like ...
0
votes
1answer
16 views

Ping from OpenVZ host to container

I have a host with multiple containers. I would to ping from the host to container, and vice versa. Currently ping works only from inside a container to the host, e.g.: root@c1313s02:~# vzctl enter ...
-2
votes
2answers
43 views

how to change the special port output source address?

I want to change the my datapackage from port 25 to another internal address(192.168.2.253). iptables -A OUTPUT -o em1 -p tcp --dport 25 -j SNAT --to 192.168.2.253 But I get the output is: ...
0
votes
1answer
28 views

Squid running in intercept mode on same machine as browser keeps giving access denied

It's been a while since I last touched squid and I've been sitting here figuring out this problem since the last few hours why my squid setup on this standalone server machine (behind router nat) ...
1
vote
1answer
50 views

Using host's iptables to prevent access to docker-container's exposed ports

I have a host which runs a few docker's containers. This host has a few network interfaces, my goal is make some exposed ports from containers accessible only by certain interfaces, and prevent ...
0
votes
0answers
37 views

Access port forwarded http service inside host only network vbox (docker)

I used vagrant to create a host only network for my ubuntuserver machine with this option: config.vm.network "private_network", type: "dhcp" Inside this box I have a docker container which is port ...
0
votes
0answers
36 views

Make local subnet clients get redirected like public clients, when requesting a redirected outside port on the firewall

I have a server that also functions as a firewall for the 192.168.1.0/24 subnet via iptables. It also double as a VM Server. Both the VM's and the local machines share the subnet. The servers ...
0
votes
0answers
13 views

iptables improvement: log DROPped connections to unknown ports/destinations for banning with fail2ban

I'm testing the following iptables rules (ipv4) with support for logging of dropped packets. I log the drops to /var/log/iptables.log and then ban retrying/hammering IPs with fail2ban. I'm no expert ...
-2
votes
1answer
31 views

Routing FQDN to Web Server on Specific Port [closed]

I am running multiple web servers on a single machine. localhost:9000 localhost:8080 I want external requests (from the open net) to mysite.com to route to port 9000 and myevenbettersite.com to ...
-1
votes
1answer
32 views

Block everything except some ports and specific IP Addresses, server can't do HTTP GET

I can't get this firewall.sh script to work. It currently doesn't allow me to get a file at 'https://index.docker.io/v1/repositories/library/ubuntu/images' so either my DNS is flawed or I am blocking ...
1
vote
1answer
15 views

limit multicast to wanted outout interfaces using iptables (or other lartc commands)

I have the unifi server running for all my access points on a network. The controller host sits on a few networks, but only one of them should be used by unifi. Of course, the server has no options ...
1
vote
0answers
42 views

Trouble setting up a transparent proxy

I have been trying without success to setup a transparent proxy on a router like computer. Most examples that I have found don't have the gateway and proxy on the same computer, so I may be looking at ...
4
votes
1answer
104 views

Alternative to Firewalld on memory critical servers?

I've bought a 512MB VPS @ DigitalOcean. Currently, I use Firewalld to allow/deny access to certain ports (probably 22, 80, 443 are open). It uses around 25-30MB of memory. EDIT: Not to forget that ...
-1
votes
2answers
33 views

Is there a way to block ALL inbound/outbound traffic going outside of a LAN with iptables?

As the title says, I'm just looking for a way to disallow any traffic on ANY port unless it's going to a local IP address (192.168.1.*).
2
votes
1answer
66 views

What is the state of subsequent http requests in iptables terms?

When a user requests a web page, e.g. www.example.com/about-us/history.html. The server will send them an HTML file, the HTML file will contain elements that subsequently generate many more HTTP ...
0
votes
1answer
61 views

Iptables block layer 7 DDoS attacks

Recently I've been experiencing lots of layer 7 ddos attacks to my website. Specifically an HTTP GET request flood on the index page. (~20k r/s), my server is at OVH, so it's not overloading the pipe, ...
0
votes
2answers
28 views

In iptables, does state ESTABLISHED require a later state NEW to make an ESTABLISHED connection?

When using the following rule: iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT ...do you need to add specific rules including the NEW states to allow for an ESTABLISHED ...
-1
votes
1answer
50 views

How to allow google-analytics via iptables when internet is blocked for other traffic [duplicate]

I am running the following script on a wifi gateway. The WAN side of the gateway has ppp0 interface while LAN side is on wlan0. No LAN user should be allowed to browser internet Some services on ...
1
vote
1answer
44 views

iptables forward ip to another ip

I've configured multiple IP Addresses on my Ubuntu ssh server. Now the server can be accessed by using any IP Address, from 192.168.0.51 to 192.168.0.99. Depending on which IP Address someone uses to ...
0
votes
0answers
28 views

How to do the port forwarding from one ip to another ip only for right incoming ip?

I'm have 2 vpn clients and 1 vpn server. One vpn client(work) has access to the server on amazon, but it seems for this server in the firewall block incoming requests from all ips except work ...
0
votes
1answer
25 views

Cannot understand this example fail2ban rule

I'm trying to secure my admin and user login page from brute force attacks. I have setup iptables and the closest thing I can find which looks useful is this: jail file: [nginx-login] enabled = true ...
0
votes
1answer
26 views

Iptables drop all connection except my domain(s)

I tried use this command to block a domain iptables -I INPUT -p tcp -m string --string "Host: domain.com" --algo bm -j REJECT and it worked but, i want to Reject all but accept from specified ...
0
votes
1answer
23 views

ip6tables snat don't work properly [closed]

I got three computers with these names: laptop, vds and home; vds is openvpn server; home is openvpn client. and, I got an ipv6 network 2a01:dead:beef::/64 vds has address 2a01:dead:beef::311 on ...
0
votes
0answers
34 views

iptables DNAT packets into an openswan IPSEC tunnel

I have the following network setup: +-----------------------------------+ | | ...
-2
votes
0answers
21 views

How to unblock IP range in iptables

I made a simple script for apache2 web server to block webscrapers. It's working fine but sometimes MSN Crawlers are getting banned. iptables -L (...) DROP all -- ...
0
votes
0answers
28 views

Trying to create a NAT with virtual Ethernet using IPTables

I have a separate namespace running on my server and I want to create a NAT that will enable Internet connectivity in this namespace. I specifically want to do this so that certain inbound ports are ...
0
votes
1answer
24 views

iptables using, goto + jump: what is the RETURN behaviour?

I'm trying to work out what is the iptables behaviour when you have multiple custom chains and you sue a mix between -goto and -jump Example: INPUT iptables -A INPUT -i eth1 -j CUSTOM-A CUSTOM-A ...
0
votes
1answer
44 views

How to block every port except specific ones to a user with iptables? [closed]

I'd like to block every port except 80, 443, 1005 to a specific user (owner) with iptables. What command should I use?
-1
votes
0answers
20 views

IPTables Quota Limiting and Redirect

I am currently working on a quota limitation for a wireless captive portal based on iptables. With the following ruleset all new connections get redirected to the login page after the quota is ...
0
votes
0answers
47 views

CentOS 6.6 ignores iptables nat rules

I try to use iptables nat to forward incoming TCP traffic to another computer. I use following rules within nat table: -A PREROUTING -i eth3 -p tcp -m tcp --dport 8888 -j DNAT --to-destination ...
0
votes
1answer
22 views

How to disable network access for a user on Linux?

Trying to disable the network access for the user: [root@notebook ~]# iptables -I OUTPUT -m owner --uid-owner tempuser -j DROP [root@notebook ~]# ip6tables -I OUTPUT -m owner --uid-owner tempuser -j ...