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
8 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
14 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 ...
-5
votes
1answer
48 views

I cannot block an IP

I'm a newbie for iptables and I've been trying to find solution for two days. I read manual http://ipset.netfilter.org/iptables.man.html . However I don't have experience. For the sake of an example; ...
0
votes
1answer
28 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 ...
0
votes
0answers
10 views

embedded device vpn routing for iptables: Good place to find docs? [on hold]

We will be making a vpn for our embedded linux devices. The embedded devices are outside the local network somewhere on the internet. We would like our company employees to be able to connect into a ...
1
vote
1answer
40 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
21 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
votes
0answers
17 views

Routing traffic using IP tables for two NICs [on hold]

I have two NICs (eth0 and eth1). I want to block all traffic (Incoming/outgoing) on eth0 except for port 25 and 993, and allow all other traffic (Incoming/outgoing) on eth1. What's the easiest IP ...
1
vote
1answer
33 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 ...
-2
votes
0answers
31 views

Google chrome and iptables [closed]

I have a problem with Google Chrome and Iptables. The problem is that I don't know how to configure the firewall properly for this browser. If i open only 443 and 80 ports the browser tries to open ...
3
votes
1answer
77 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
47 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
40 views

ubuntu iptables DROP action has no effect [on hold]

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
45 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
62 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
27 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
23 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
21 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
1answer
60 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 ...
-5
votes
0answers
30 views

Block All Connections Not From CloudFlare [duplicate]

I have a simple request. I would like to only allow traffic to my server from cloudflare. My website is being pounded by attacks, and there is no legit reason someone should be making a connection to ...
1
vote
2answers
98 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
37 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
50 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 ...
3
votes
0answers
68 views
+50

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
35 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
48 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
15 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
18 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
29 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
19 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
33 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
18 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
79 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
59 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
38 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
22 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
59 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
44 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
48 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
22 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
28 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
37 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
33 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
25 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
12 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
34 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
26 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
44 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
77 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
69 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 ...