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

pacemaker virtual ip loadbalancing with clone and clusterip

I am trying to make a loadbalanced gateway for a group of natted machines. I have 3 centos nodes. Initially only one node was supposed to have the internal gateway ip and that works well. Traffic ...
0
votes
1answer
11 views

NFS mount internal error

I have a server that I use for NFS share. 4 servers use it without a problem. I configured a new server and that can't mount. I get this error mount.nfs: internal error In the logfile of the ...
0
votes
0answers
8 views

Route/Forward specific traffic to Interface

I want to use a Rasperry Pi as (Wlan-)Router. The Access Point is working so far: I have an Accesspoint with wlan0 (ip 10.10.0.0/255.255.0.0) and wlan1 connected to the internet. Now I want to route ...
2
votes
1answer
1k views

Route outbound connections from local network through VPN

I have a server A running OpenVPN, an OpenVPN client B (a rooted Android phone as it happens) and a third party C (a laptop, tablet etc.) tethered to B. B can use the VPN to access the internet via ...
1
vote
1answer
2k 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
43 views

Multiple Gateways for Single Subnet

Right, this might be a long one, so bare with me... I have 2 machines, lets call them local1 and cloud1. local1 has 3 Nics: 2 connected directly to cable modems with public IPS (call them eth0 and ...
2
votes
3answers
1k views

Reach LXC container from a virtualbox guest on the same host

Context I develop websites on my Ubuntu laptop (Ubuntu 13.04 64b). Each site runs within a dedicated LXC container¹ on network 10.0.3.x I sometimes need to reach those sites from a virtualbox guest ...
1
vote
1answer
149 views

Huge performance penalty in gbit link with ip forwarding / masquerade through clear VPN tunnel

I have a problem with IP forwarding between my home computer and a remote server (from online.net). My home connection is a 1 Gbit/s FTTH and the remote server has a 2.5 Gbit/s bandwidth. The context ...
0
votes
1answer
21 views

Why is my ISP box talking to my DMZ host?

I have a setup where an internet connection is available via ISP box, which has a DMZ feature (one of the hosts can be exposed to Internet). The general setup is the following Internet - PublicIP - ...
0
votes
1answer
95 views

Iptables source mac match not always matching?

I have added some rules to my PREROUTING chain in NAT. Usually at the beginning of a new machine joining the network, these matches don't always match correctly? Im using iptables v1.4.21 on OpenWRT ...
2
votes
2answers
1k views

Correct usage of whitelisting cloudflare IPs in iptables

I'm relatively new to using the command line so I'm understandably nervous about fiddling around with IP tables and accidentally doing something wrong which consequently opens up vulnerabilities in ...
1
vote
4answers
20k views

Error applying iptables rules using iptables-restore

Hi I'm using Ubuntu 9.04 on a VPS. I'm getting an error if I apply a iptables rule. Here is what I have done. 1.Saved the existing rules iptables-save > /etc/iptables.up.rules Created ...
-2
votes
0answers
16 views

How to block ssh when not logged into openvpnas

How can I configure my server so that someone who tries to SSH into the server without being logged into the openvpnas is dropped and only people who are "inside" the network (connected to openvpnas) ...
0
votes
0answers
8 views

Docker is only listening locally on a container connected to a VPN

I've just nuked my CoreOS box and am rebuilding the setup as a Ubuntu Xenial (16.04) based docker platform. I'm happy with it so far but I'm now having to re-resolve a problem I already fixed on ...
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
3k 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 ...
0
votes
1answer
25 views

Forward outgoing traffic for port to another server using iptables

I'm trying to forward outgoing traffic 194.97.114.3:2010 to another server but with no luck. netstat -anup gives me udp 0 0 94.23.28.183:44174 194.97.114.3:2010 ESTABLISHED ...
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
votes
0answers
17 views

Ports aren't really getting blocked with iptables

I'm on Ubuntu 14.04.4 LTS, I'm under attack from some ports, I blocked all of ports except SSH in my own server, I'm doing that by this way: iptables -F iptables -P INPUT DROP iptables -P OUTPUT DROP ...
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 ...
13
votes
3answers
1k views

Debugging iptables and common firewall pitfalls?

This is a proposed Canonical Question about understanding and debugging the software firewall on Linux systems. In response to EEAA's answer and @Shog's comment that we need a suitable ...
3
votes
1answer
2k views

What does nf_conntrack.acct really do?

I've found the kernel parameter nf_conntrack.acct interesting, in that the kernel documentation merely says "Enable connection tracking flow accounting". I've appended this to grub and rebooted and I ...
1
vote
0answers
12 views

How do I remove ufw blocked protocol 59 log noise?

The logfile on one of my private servers running Ubuntu 14.04 is being filled with messages of the following form: [UFW BLOCK] IN=eth0 OUT= MAC=[macaddr] SRC=[srcipv6addr] DST=[destipv6addr] LEN=40 ...
-1
votes
2answers
57 views

Iptables on a Debian machine, the delete command needs a networking restart to work?

I have a big problem with iptables, this the thing I try to make : PC windows (192.168.1.1) -> (192.168.1.2) PC Linux (192.168.2.1) -> (192.168.2.2) card I want to forward the messages from Windows ...
0
votes
1answer
24 views

What is the FIREWALLD equivalent to IPTABLES -NOTRACK

I recently converted to centos 7 and so far I am beginning to like the simplicity of zones in my firewall structure, however I can't seem to find a configuration parameter for firewalld like the ...
-1
votes
2answers
28 views

iptables for internet connection sharing

Objective: I am working on an embedded Linux device with the following network configuration. Interface-1: 'wlan0' acts as an access point. Interface-2: 'eth1' connected to Internet. Interface-3: ...
-1
votes
0answers
56 views

iptables error on lxc container (centOS) with Ubuntu host

Currently I'm encountering the following error when I try to start iptables(service iptables start) inside lxc container. The lxc container is centOS and host is Ubuntu physical server. And modules ...
6
votes
4answers
1k views

Duplicate iptable rules

I have this iptable rules: -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -N fail2ban-ssh -A INPUT -p tcp -m multiport --dports 22 -j fail2ban-ssh -A INPUT -p tcp -m multiport --dports 22 -j ...
-1
votes
1answer
26 views

Send local traffic from host A:3306 to host B:3306

I'm having trouble making sense of all the iptable examples out there. I simple want all requests from my machine to host A on port 3306 to actually go to host B on port 3306. How can I do this?
0
votes
1answer
12 views

Except some IPs from rule to not allow internet through openwrt + openvpn when vpn is disconnected

I have the following working setup on my network: A. ISP-Router (connected to inet, internal ip 192.168.0.1 ) <----> B. eth0 - OpenWrt Router (OpenVPN client running) br-lan (bridge eth1 + wlan0, ...
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
10 views

iptables rules only work using -m owner

Let's say I have the following rules, since I only want to allow traffic going over my tun0 interface: iptables -A OUTPUT -o tun0 -j ACCEPT iptables -A OUTPUT -j REJECT Unfortunately, the above ...
-1
votes
1answer
20 views

Open port 8082 on ubuntu for remote access

I need to open port 8082 on my linux box for remote access. I can access the application on port 8082 locally, but not from my other box. Ports 8080 and 8081 are accessible locally as well as remote. ...
1
vote
1answer
25 views

iptables REDIRECT and only allow dport

Quick iptables question, I hope. We're running this in iptables: -A PREROUTING -i eth0 -p udp -m udp --dport 57875 -j REDIRECT --to-ports 5060 and then we also have: -A INPUT -p udp -m udp ...
3
votes
1answer
120 views

Create a multi-homed linux load balancer with two internet connections and one LAN connection

OK,... this has possibly been answered, unfortunately, I have not found anything that looks like it might be the resolution. Ive looked at these pages and they have some useful information, but not ...
0
votes
1answer
34 views

Linux server failing to send SYN/ACK after receiving SYN remotely, works locally

Problem: A server process can be accessed by a device on the LAN or by the server itself, but it cannot be accessed outside the LAN (port forwarding is configured correctly as the server does receive ...
13
votes
5answers
43k views

Whitelist allowed IPs (in/out) using iptables

I have a few ip ranges to which I want my server to able to connect and users to connect from. Everything else should be blocked. How should I do that with iptables? My OS is Debian based linux ...
-1
votes
0answers
25 views

How to create an iptables rule for a specific bonded network interface?

I have a "bare metal" server with a popular cloud hosting provider. (Running Ubuntu 14 in case that's important.) This machine has a network interface that faces the public internet, and also ...
0
votes
1answer
17 views

Redirecting outbound traffic to specific IP to localhost

I'm mocking a service, which would in actuality run on 10.1.10.1, and in so doing am trying to redirect the traffic bound for 10.1.10.1 to 127.0.0.1. To create my rule, I'm running iptables -t nat ...
0
votes
0answers
15 views

Connection refused with both iptables and firewalld disabled on CentOS. Why? [duplicate]

My Rig Server A with Bacula Dir installed Server B with Bacula Client installed Both uses CentOS 7 Objective. Open port 9102 to be able to access Server B from Server A via Bacula Dir. The ...
0
votes
2answers
2k 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
8k views

IPtables rules bad arguments

I'm trying to write IPtables rules,but I'm finding it difficult. I've got: iptables -A FORWARD -m state –state RELATED,ESTABLISHED -j ACCEPT which fails with Bad argument `–state' and iptables ...
1
vote
1answer
24 views

Loading Blacklist of IPs from a file into IPTABLES

In a separate file I'm creating a list of IP addresses to be blocked. This file will have IPs added in or removed on a daily basis. I want to "reference" this IP File into /etc/sysconfig/iptables, but ...
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 ...
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], ...
5
votes
3answers
2k views

How to reset a tcp connection immediately on both ends on a certain condition using linux netfilter/iptables?

Dear Serverfault community, I have the following problem: I need to reset (disconnect) tcp connections on both network sides immediately if a certain string is encountered in the packet data. I don't ...
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
0answers
12 views

Multiple IP failover on VPN PPTP

I have a server at SoYouStart, I ordered an IP failover. I want to setup a PPTP VPN so I could be able to have one connection to the "normal" IP and one to the failover IP I couldn't manage to do ...
0
votes
0answers
29 views

Configuration SNAT iptables in ubuntu

I have 2 PC be created by VMWARE 1. PC1 (make iptables router): eth0 's IP: 192.168.1.4/24 (network connection is bridged) eth1 's IP: 192.168.2.2/24. (network connection is wmnet9) 2. PC2: ...
0
votes
0answers
7 views

How do I get default LXC iptable rules into Shorewall?

I'm setting up a server which will be hosting multiple LXC containers. However, starting Shorewall results in loss network access from within the LXC containers. If I reboot the LXC host and leaves ...