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
1answer
120 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
24 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
73 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
2answers
82 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
31 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 ...
0
votes
1answer
65 views

why my nat iptables rules dont work with marked packets?

System: debian squeeze, Linux server 2.6.32-5-amd64 #1 SMP Tue May 13 16:34:35 UTC 2014 x86_64 GNU/Linux, iptables v1.4.8 lsmod | grep iptable iptable_security 2176 0 iptable_mangle ...
0
votes
1answer
31 views

Static route to Single IP using SSL connection

I am trying to configure a static route to a single IP. My question is two fold: How do I specify a single IP using a subnet mask x.x.x.x/? (not a range of ip's) My pc is making an SSL connection to ...
0
votes
1answer
44 views

Cannot find error in iptables firewall configuration

I'm struggling with a firewall problem on my Centos server. I have the following configuration which when I use it with a service iptables restart and I try to ssh to the server with putty, I cannot ...
1
vote
1answer
80 views

IPtables drops all, but postfix still send emails

My iptables rules: # delete all current rules and user chains iptables -F iptables -X # global policy (target by default) iptables -P INPUT DROP iptables -P OUTPUT DROP iptables -P FORWARD DROP # ...
0
votes
1answer
60 views

Configuring iptables for Haproxy

Ubuntu machine running haproxy with 2 network cards, 1 connected to WAN (called wan0) and another connected to LAN (called lan0). All chains set to DROP traffic. # Masquerade traffic from LAN to WAN ...
1
vote
1answer
71 views

Tcpdump/Iptables on bridge interface without assigned IP address

I have set up a bridge interface without an ip on it. $ brctl addbr br0 $ brctl addif tap0 $ brctl addif tap1 $ ifconfig br0 up As seen above, this bridge is connecting 2 TAP interfaces setup ...
3
votes
1answer
188 views

OpenVPN routing: multiple default entries. OpenVPN client: iptables. DNS issues

I'm running an OpenVPN-Server (Debian 8) for privacy purposes when using public wifi. Hence, all network traffic of the client is intended to be handled over the VPN connection. The server and client ...
2
votes
1answer
108 views

Block smtp service to a IP centos 7 Firewall

I would like to know how to block an IP to use smtp service on a server with centos 7 firewall . I try to use something like this : firewall-cmd --permanent --zone="public" --add-rich-rule='rule ...
-2
votes
1answer
56 views

ubuntu iptables DROP action has no effect [closed]

I installed zentyal web panel for ubuntu, And after a monument I removed it. After remove zentyal, iptables seems work not properly. DROP has no effect Run following code has no effect to block port ...
3
votes
1answer
60 views

PF vs -m of iptables

As you know, iptables has -m (match) such as : -m string -m state -m -iplimit and so on... My question: Does PF has similar features such as -m of iptables?
3
votes
2answers
86 views

Map IP to another IP

Assume the following scenario, if I have a local machine (A) the requests another machine (B) using B's internal IP without regard the ports. But A and B are not on the same network, however, B has a ...
0
votes
2answers
43 views

iptables blocking script using arp table lookup

I need to block certain hosts (multi-OS) on our LAN from gaining internet access. I decided to try and block certain hosts by mac address via iptables but I can't use the mac address of the ...
-2
votes
1answer
29 views

port forward in INPUT level

I want to change the destination port of the ipv6 packet in the INPUT level. So I tried to use ip6tables with nat in the INPUT level but seems this command does not work # ip6tables -t nat -I INPUT ...
0
votes
1answer
42 views

route output traffic from specific NAT'ed VM via ip alias

In a dedicated server with several containers behind NAT, I'm trying to route the output / outbound traffic from one of the containers through a specific virtual interface attached to the main ...
0
votes
2answers
138 views

Firewall rules not restricting access to Docker Web Apps

I have a problem where ports exposed to applications running on our system in docker containers remain open to the world despite the iptables configuration designed to restrict access. It seems to me ...
1
vote
2answers
136 views

iptables not blocking IP addresses

I am experiencing DDOS attack on my server. I found out that someone was trying hard on one of Wordpress websites. I disabled that virtual host for temporarily. I am now trying to block their IP ...
0
votes
1answer
54 views

Iptables - Drop or Reject the whole connection

I have the following iptables log: May 13 17:29:20 Test: IN=eth0 LEN=60 TOS=0x00 PREC=0x00 TTL=56 ID=0 DF PROTO=TCP SPT=80 DPT=40660 WINDOW=14480 RES=0x00 ACK SYN URGP=0 May 13 17:29:20 Test: ...
0
votes
1answer
78 views

Block an IP for UDP

I am under UDP flood attack. I used following protections to solve it: iptable IP ban: iptables -I INPUT -s 37.187.231.xxx -j DROP Tried another iptable syntax /sbin/iptables -I INPUT -i eth0 -s ...
4
votes
1answer
105 views

Iptables LOG rule inside a network namespace

I'm trying to setup iptables rules for a docker container. I'm using nsenter to execute the iptables command inside of the container's network namespace: # log access to port 8080 PID=$(docker ...
0
votes
1answer
61 views

Route a port through a specific network interface

I'm using OpenVPN on Ubuntu Server to connect to my VPN. That network interface is tun0. All traffic currently goes through the VPN. I'd like to exclude traffic that goes over a specific port, and ...
1
vote
2answers
83 views

Block https by mac address. Squid or iptables

I want to block web access (http and https) to certain mac addresses. I was able to do this for http using squid but it still lets https sites through. acl denylist arp "/etc/squid/mac-deny-list.lst ...
0
votes
0answers
34 views

Block Bad Referer

I am annoyed by a lot of bad referer spammers I am seeing in apache's logs. 208.118.126.250 - - [12/May/2015:17:45:06 +0200] "GET /js/parsley.js HTTP/1.1" 200 91434 "http://voiceit.be/logins/login" ...
0
votes
0answers
26 views

Reject a http response with iptables and log it

I just started working with iptables and I am trying to do something that I even know for sure if is really possible. I need to test some of my services in a particular server. To debug my ...
0
votes
0answers
48 views

How to block ip/ports using iptables with specific date and time?

Normally to block in command-line I used iptables. iptables -I INTPUT -s xxx.xxx.xxx.xxx -m time --utc --datestart 2013-09-09T15:00 --datestop 2013-09-09T15:30 -j DROP But the problem is, this ...
0
votes
0answers
37 views

How to forward traffic from ipsec host to local network?

Could anybody explain how to implement forward traffic from host in IPsec to local network. On my server I have 3 network cards: red0 - extern orange0 - dmz green0 - local IPsec builds through ...
1
vote
1answer
71 views

Can't get iptables working in VPS - state and conntrack not possible

I've been browsing and reading documentations all night and I can't figure out any solution... I'm trying to get iptables working on my VPS (Debian 7). But I can't get established connections ...
0
votes
0answers
45 views

Static IP Forwarding on OpenWRT

I have a /28 block of static IP's that my ISP provides. Lets say x.x.x.x/28. The new building we are in has a OpenWRT router that I want to configure to forward those IP's to specific servers on the ...
3
votes
1answer
126 views

How do I combine firewall --enabled and --nobase in a CentOS kickstart?

As part of system hardening, I'm trying to configure my firewall during a CentOS 6.6 kickstart with the following line. It does work under one circumstance, and otherwise it doesn't. Kickstart ...
0
votes
1answer
103 views

Make Asterisk to serve another subnet

I have server with Linux Ubuntu 12.04. It has two subnets - 192.168.0.1(eth0) and 192.168.1.1 (eth1). There is an Asterisk server (IP PBX) connected to first subnet, lets say it has IP address ...
1
vote
0answers
61 views

Linux ipv6 forwarding

Situation I know how to do ipv4 forwarding, and expected ipv6 forwarding to work pretty much the same way. So I configured a VirtualBox host with the network address configured from my ISP. Right ...
1
vote
0answers
38 views

How to reroute outgoing vpn server traffic to Tor with iptables? [closed]

After three days of following HowTos, guides, some debugging and help from guys at users@lists.strongswan.org I was able to setup a VPN server on my spare PC (Ubuntu Server 14.04) using StrongSwan. ...
2
votes
0answers
78 views

Stop senseless mass-queries on DNS-server [duplicate]

I have a disturbing problem for a few weeks now ... One of my three DNS-servers (running bind9 as slave of a Plesk DNS master) is getting spammed with senseless DNS requests. The origin IPs of those ...
-1
votes
2answers
83 views

Port forwarding ssh with iptables

Moved from stackoverflow... My new Internet firewall, based on Linux iptables, is working in most regards very well, but the port forwarding does not work: $ ssh -p 7022 [ppp0-ip-address] ssh: ...
1
vote
1answer
113 views

IPTABLES block User-Agent

I get DDoS by the Wordpress Pingback BOTNET, now I want to block all client who contain Wordpress in there Useragents. For example: WordPress/4.0; http://vk.lokos.net; verifying pingback from ...
-1
votes
1answer
37 views

rewrite destination IP of TEEed traffic

Server 1 and Server 2 (Centos 7) both host the same application, which listens on UDP port 1514. Server 1 receives traffic on this port. The goal is for the application on Server 2 to receive a copy ...
-1
votes
2answers
45 views

iptables unable to open 80 && 8000 port on my ubuntu server

I am unable to open 8080 port on my server though iptables settings seem correct Here is the result of iptables-save iptables-save # Generated by iptables-save v1.4.21 on Thu May 7 21:31:19 2015 ...
1
vote
1answer
117 views

Iptables udp port forwarding [duplicate]

I'm using latest debian relese and i need to do some port forwarding, but i dont know how.I have 2 stream sources coming to my server on the same udp port from 2 diferent ip-s 192.168.1.2:1003 via ...
0
votes
2answers
40 views

Redirect a port to a blocked port but with the filter to unlock it

I have all ports with iptables dropped for security reasons, now i want to open a port which redirects the traffic to a blocked port, but it will open if the traffic comes to this port. Let's see, i ...
0
votes
0answers
51 views

SNAT traffic through tun interface

Here is the diagram of the network : Internet -----eth0(WAN), tun0 (GATEWAYPC) eth1(LAN)----- UserPCs Network interface : eth0 : WAN, DHCP tun0 : OpenVPN Client tunnel IP:10.0.0.9, ...
0
votes
0answers
16 views

IPTables slow FTP listing

Every time I open a new connection (which uses a different port then), it is very slow until the communication starts. For example Downloading multiple files via FTP, listing new dirs and so on takes ...
0
votes
1answer
46 views

Configure IPTables on KVM host to drop packets on the virtual isolated network

I have two KVM guests, both connected to a KVM virtual isolated network (called virbr1, address space 10.0.0.0/24). For testing a routing solution, I want to imitate a failure of the physical link ...
1
vote
1answer
59 views

cURL to localhost gets dropped by iptables

I'm trying to use cURL on the shell to connect to localhost. I'm using curl http://localhost:80 to connect. Unfortunately, it's being blocked by iptables. Here's the error in the iptables log for why: ...
1
vote
2answers
58 views

Iptables doesn't forward ssh access to instance under a public subnet

I have the following scenario: 1 - A bastion (NAT) instance which I use as a gateway to forward ssh access to all my private instances (using iptables) [Private IP: 10.10.1.10 Public IP: ...
0
votes
1answer
173 views

Allow only SSH, FTP and Cloudflare Servers via IPTables

I want to allow only SSH access, FTP access and all communications between my Dedicated Server and all Cloudflare Servers using IPTables. I tried the commands beneath but it seems like I kicked out ...
0
votes
1answer
182 views

Can't access mysql docker container from the host

I have a debian server with docker 1.6.0 on it with a running official mysql container (https://registry.hub.docker.com/_/mysql/). I use a fairly basic firewall configuration in which all ports are ...