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
2answers
1k views

grep, count and sort iptables log to get IPs qty and DPT?

How can I grep count and sort iptables log to get IPs quantity and DPT? Like I used this oneliner to get top IP quantity. egrep -w "Invalid Packet" ipfirewall.log | grep -o '[0-9][0-9]*\.[0-9][0-9]*\...
-1
votes
3answers
50 views

Can not connect to the host itself

Well, the problem is simple. I have the site based on apache and trying to execute cron job at this site from the same server. Let's say my site http://example.com and cronjob is /usr/bin/curl http:/...
-1
votes
0answers
12 views

Routing packets from one interface to another while leaving untouched the default interface

I have a Raspberry Pi box with the following physical network interfaces: eth0 - built-in Ethernet, connected to my router's LAN wlan0 - built-in wlan, also connected to the LAN but unused wlan1 - ...
0
votes
2answers
40 views

monitor traffic at the scale of millisecond

I have several linux servers running Ubuntu 14.04, and turned them into a Spark cluster. At this point, I want to measure the network flow between the servers, at the scale of milliseconds, in order ...
0
votes
0answers
11 views

iptables: how to configure ip:port package forward?

I want to configure server (10.100.1.138:10000) as a jump server(which iptables server), all request to 10.100.1.138:10000 will forward to another public web-site (such as 111.13.101.208:80), and I ...
-1
votes
2answers
20 views

Iptables not working with policies drop and state

I configured iptables with the following rules, but something is blocking access to port 80 iptables -P INPUT DROP iptables -P OUTPUT DROP iptables -A INPUT -i eth0 -p tcp --dport 80 -m state --state ...
1
vote
1answer
3k views

Missing iptables rules for Strongswan routing for VPN for phone

I have a Centos 6.6 VPS out on the Internet that has a public IP. I have installed StrongSwan 5.1.3 to allow my BlackBerry10 phone to connect from hotspots and use the VPS' connection. The VPS' IP ...
0
votes
0answers
18 views

(D)DoS Detection within linux and IPTables

We currently have a hardware firewall running on Ubuntu 14.04 on a 10Ge network. We use this to filter traffic and attacks, this is all working great and we have blocked quite a lot of DNS/NTP attacks....
2
votes
1answer
2k views

OpenVPN connected but no Internet or LAN

Good evening, I'm facing an issue with my OpenVPN installation. Been at it for 3 days now but still cant figure out what is wrong for the life of me... Basically the issue is that i'm able to ...
2
votes
1answer
4k views

strongswan VPN on OpenWrt

Hi I'm running Barrier Breaker version of OpenWRT and I have setup a VPN according to: http://wiki.openwrt.org/inbox/strongswan.howto I can connect to the VPN with my iPhone or Mac (to 10.10.1.0/24 ...
1
vote
1answer
39 views

Configure iptables on linux ubuntu to route only specific IP between two networks

I'm not a linux expert and I need to setup this scenario. I've an Hyper-V host where I have two virtual network interfaces, both of them are added to a linux ubuntu machine, eth0 and eth1. Now I ...
-1
votes
0answers
11 views

mail server behind ubuntu iptables router [duplicate]

I want to run a mailserver behind an iptables router. I set up the router with ip-forwarding on Ubuntu 16.04 Server edition. I enabled ip-forwarding in /etc/sysctl.conf . I have set net.ipv4....
0
votes
0answers
27 views

smtp-request behind iptables-router not working

I set up a router with ip-forwarding on Ubuntu 16.04 Server edition. I enabled ip-forwarding in /etc/sysctl.conf . I have set net.ipv4.ip_forward=1 and executed sysctl -p /etc/sysctl.conf I used ...
-1
votes
0answers
21 views

Unable to elinks or Ping sites after starting IPtables service

Good day! I hope you can help me. I know how to add basic iptable rules but I don't know how to add rules for the following setup. Below are my host details: HOST01 - with Squid(port 3128) for ...
6
votes
4answers
4k views

Openvpn, forward packets very slowly

I rebooted my server, and an odd issue just came out. I am running on ArchLinux, the clients are Ubuntu, Android and Mac. The problem is that accessing the internet via the clients is slow, about 2ko/...
-1
votes
1answer
14 views

Name of the tun interface when running openvpn?

I have two OpenVPN client setups, controlled by systemd services openvpn.foo and openvpn.bar. They connect to different VPNs and may or may not be active at any point in time. I'd like to set up ...
2
votes
2answers
1k views

iptables forward port from ext network to the int

I have 2 ip addresses on iface eth0: eth0 Link encap:Ethernet HWaddr 00:19:99:a4:14:08 inet addr:85.25.152.115 Bcast:85.25.152.255 Mask:255.255.255.0 inet6 addr: fe80::...
0
votes
1answer
34 views

Unable to connect to OpenVPN server from devices that are in same network than the VPN server

I have Open VPN server to which I can connect from devices from the Internet but I can not connect to the VPN server from devices that are in the same network where the other end of the VPN server is ...
0
votes
1answer
33 views

How to block 111 udp port via iptables?

I've got an issue related to block 111 port only for udp. For tcp it was blocked without any problem. This port is used by application rpcbind. I test it via netcat. This is my iptables. It contains ...
-1
votes
1answer
15 views

Local Port Forwarding does not work when only port 22 is allowed by Iptables

I'm trying to perfom a Local Port Forwarding using SSH tunneling. Machine 1: the rules of iptables are: Chain INPUT (policy ACCEPT) target prot opt source destination ...
0
votes
1answer
1k views

Iptable Rule to redirect all traffic requesting a specific domain

I'm on a simple linux proxy. I'd like to add iptable rules to drop all requests for a specific domain. I figured I run a dig command to get the ip addresses for the domain and then add an iptable ...
0
votes
0answers
89 views

iptables redirect packet nat

We currently run the following iptables rule: -A PREROUTING -d DSTIP -p udp -m udp --dport DSTPORT -m u32 --u32 "0x0>>0x16&0x3c@0x8=0xffffffff&&0x0>>0x16&0x3c@0xc=...
0
votes
1answer
25 views

Forward port and keep source IP

I have a system with a static IP address running several LXC containers. I can communicate with the containers over an interface as it would be a physical machine. One of this containers is a postfix ...
3
votes
1answer
1k views

Using LVS (Linux Virtual Server) for doing DNS HA

I have been trying to create an LVS DNS HA using CentOS 6.x: Piranha GUI to configure the DNS Pulse is the HA heart of CentOS LB IPTables to configure marks on the packets since DNS uses TCP and UDP ...
1
vote
1answer
26 views

What is correct iptables chain to put -j NETFLOW

I have a router, with firewall (with drop policy), nats, services. I want to account all factual traffic (inputed before firewal, outputed by services, and passed firewall in forwarding), with its "...
2
votes
1answer
73 views

How to exclude lan from routing

server1 - eth0 - 192.168.1.212 (192.168.1.0/24) - eth1 - 192.168.5.1 (192.168.5.0/24) --> router2 --> DSL server2 - eth0 - 192.168.1.223 (192.168.1.0/24) - eth1 - 192.168.123.223 (192....
1
vote
0answers
24 views

iptables - POSTROUTING / SNAT doesn't change source IP (two routing tables)

I have a problem with iptables POSTROUTING rule, it seems that SNAT rule doesn't change source IP address. I would like set up the following system to route all traffic from LAN 2 through a VPN tunnel....
2
votes
1answer
43 views

Trouble with nginx and PHP-FPM

I am having trouble getting my webserver (nginx) to work with php-fpm. The page keeps loading and then the loading time expires. I hope one of you can help me resolve this issue. I have made an ...
0
votes
1answer
2k views

Gre Tunnel Cisco Linux traffic forwarding

I setup a gre tunnel a cisco router and a Linux machine, the tunnel interface in the Linux box named pic. Well i have to forward traffic coming from cisco through the Linux box. the rules i've set in ...
5
votes
4answers
10k views

Iptables NAT logging

I have a box setup as a router using Iptables (masquerade), logging all network traffic. The problem: Connections from LAN IPs to WAN show fine, i.e. SRC=192.168.32.10 -> DST=60.242.67.190 but for ...
1
vote
1answer
2k views

firewalld service is running, but firewall-cmd doesn't work

I am new to Centos 7/Server management. I am trying to figure out how to work with firewalld. my kernel release is: 2.6.32-042stab084.20(OpenVZ) And: #firewall-cmd --version #0.3.9 The problem is ...
1
vote
1answer
16 views

UFW 0.35 - Redirect incoming port 2121 to port 21 on VM (other interface)

I'm posting here because I've got a server, and I want to redirect the port 2121 of my main interface (eth0) to the port 21 of my secondary interface (virbr0). This is my configuration : Physical ...
2
votes
1answer
27 views

Rule of fail2ban not working when the request is from the brute force attack

I have a situation where some IP from moldova try everyday discover my basic auth credentials with some type of brute force attack. However I have a rule with fail2ban that should avoid this ...
0
votes
1answer
17 views

Ubuntu 12.04 server cannot access anything outside

My Ubuntu 12.04 server was working fine a few days ago. But today I couldn't access anything outside. And i cannot ssh to my server neither. I am directly plugged into the console through my vps ...
0
votes
2answers
1k views

Blocking STP Traffic

I am using Xen virtualization with a bridged mode netwrk. I noticed that there is a lot of spanning tree (as understand) traffic coming from a network. Such as: STP 802.1d, Config, Flags [none], ...
0
votes
1answer
1k views

How can I block all traffic to/from an bridged interface while allowing DHCP?

I have a PC (running Fedora 20) that is being used as a "software switch" to control the network connectivity of some external devices. There are eight such devices; the PC has two 4-port Ethernet ...
0
votes
1answer
4k views

iptables forward rule not working in openwrt

I am trying to apply some iptables forwarding rules in openwrt. Here is my scenario - My server has two cards ath0 and br-lan. br-lan is connected to internet and ath0 to private network. The other ...
2
votes
0answers
16 views

Iptables don't load balance

I have consulted multiple tutorials to achieve load balancing over two internet connections. However, all traffic continues to get routed over the default route with the lowest metric, and I can't ...
0
votes
2answers
3k views

lots of UDP_IN Blocked errors

Since I have reinstalled my OS, I'm getting lots of UDP_IN Blocked errors in my messages log. Can anyone kindly explain what the error say exactly and what I can do to get rid of this error. Aug 8 ...
3
votes
1answer
559 views

What is the windows server equivalent of iptables?

I found this post however it is outdated and appears to be focused on consumer versions of Windows. What is the Windows Server 2012+ equivalent of iptables?
0
votes
0answers
29 views

Best way to throttle aggressive clients on LAMP server using iptables?

I've found two ways to do this using iptables. One is using the recent module: iptables -A INPUT -p tcp --dport 80 -i eth0 -m state --state NEW -m recent --set iptables -A INPUT -p tcp --dport 80 -i ...
2
votes
1answer
110 views

Is it possible (how?) to Route incoming UDP packets with one target IP to a destination IP that is resolved through a DNS query for a static URL?

I have a set of mobile devices that are configured to send UDP messages to an IP-address that is set in their SRAM. They don't have the capability to either store a URL, or resolve a URL to an IP ...
0
votes
0answers
12 views

How to redirect traffic every time when service hostapd is started?

I have been using iptables to redirect all traffic to remote host on port 80 towards my local proxy 127.0.0.1:8080 for testing. I used iptables -n nat -L to check if iptables is set. sudo iptables -t ...
0
votes
0answers
136 views

“Connection timed out” on Debian jessie after some successful tries

I have a root server hosted at Hetzner. After upgrading the server to debian jessie I experience connectivity problems. After connecting successfully to the server for 2 to 5 times it stops answering ...
5
votes
3answers
7k views

Using FTPS (FTP over explicit TLS/SSL) with active ftp?

I am using vsftpd with active ftp. I have module "ip_conntrack_ftp" (in /etc/sysconfig/iptables-config) on and port 21 is open. Connecting with FTP works, but FTPS doesn't. I can login but get no ...
0
votes
0answers
39 views

blocking subnets in iptables

I currently have a router attached to the main network (192.168.0.x). On this router, I want the ethernet-ports to link to the main network, and the vlan's (wireless) to be set up via a separate DHCP ...
3
votes
1answer
1k views

Possible for linux bridge to intercept traffic?

I have a linux machine setup as a bridge between a client and a server; brctl addbr0 brctl addif br0 eth1 brctl addif br0 eth2 ifconfig eth1 0.0.0.0 ifconfig eth2 0.0.0.0 ip link set br0 up I also ...
21
votes
4answers
12k views

Where does UFW (uncomplicated firewall) save command-line rules to?

You add a rule like this: ufw allow 22/tcp The rule is saved, and is applied even after reboot. But it's not written anywhere in /etc/ufw. Where is it saved to? (Ubuntu, using ufw as pre-installed.)...
15
votes
4answers
14k views

Iptables management with ansible in huge environment

What is the best way to manage iptables from one point and have the ability to edit something on local server. We need to add some rules centralized on all servers, but we have specific servers with ...
-1
votes
2answers
27 views

Iptables not working on a bridged setup [closed]

I am trying to block DNS requests using an Ubuntu machine. I have created a bridge and the packets are being forwarded as expected. Only when I add iptables rules, it is not taken in account. I tried ...