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

UDP tunnelling outside OpenVPN

this is my first post. I have already looked for solutions but I haven't solved my problem at all actually. I have a linux server connected to a OpenVPN server whose service I pay for. This provider ...
0
votes
0answers
6 views

iptables: Redirect traffic from destination IP to new IP

I have a PC client. I like to redirect outgoing TCP connections on port 80 with the target IP 1.1.1.1 to the target IP 2.2.2.2. The full connection should be redirected, which means also the answer ...
0
votes
1answer
6 views

self-curl blocked by iptables

I can't figure out which rule is missing to make this happen... # iptables -Z ; curl -v -k --connect-timeout 2 http://www.myhost.com/ ; iptables -L -v * Hostname was NOT found in DNS cache * Trying ...
0
votes
1answer
17 views

Firewall rules for ssh, ftp and webapps

I'm running a small cluster with Centos 7 and want the following rules for firewall. Have ssh access from anywhere (i'm going to further configure that from /etc/ssh/sshd_config) Have ftp access to ...
-1
votes
1answer
27 views

Can't figure out why iptables rule doesn't work

I'm trying to use iptables to redirect my computer's port 80 to port 1080 where I have a nginx configured to listen there. I have the following rules: # Generated by iptables-save v1.4.21 on Mon May ...
0
votes
0answers
13 views

Block port from the outside except Docker

I installed a jenkins via Docker on my server and assigned to a specific domain (jenkins.mydomain.com), which works perfectly fine. But I can also reach jenkins (and every other service in docker) if ...
0
votes
0answers
12 views

Debian iptables load fail

I Have Debian 8 Jessie and I have installed iptables, but it's not correctly. I can add rule just like: iptables -A OUTPUT -s 212.50.128.0/19 -j DROP but it's not working. iptables -L command works ...
0
votes
0answers
8 views

From what file/script libvirt inject rules in iptables when I start service libvirtd?

Everybody know that libvirt have his own list of rules for iptables, that he automatically inject in our iptables, after we start service libvirtd Problem: After standard installation of KVM and ...
0
votes
0answers
27 views

Forward port 80 to 8080 for a specific IP on the network

I have a specific PC on my network running a web service on port 8080. I also have a different machine which acts as a gateway/router, which I configure using iptables rules. What I want to do is ...
2
votes
1answer
42 views

Forward SSH to another Host

I have an ubuntu server which is visible from internet, let's call it "jumper". And this server has this name actually because I need that whenever an user SSH this server, it jumps (or forward or ...
1
vote
1answer
31 views

How does iptables --hitcount collect its values

Im looking at SSH bruteforce prevention with iptables recent module. I would like to know how does the --hitcount collect the value that it will use? Is it bytes, packets, no. of conntracked items or ...
2
votes
1answer
24 views

Postfix not accepting external connections

I have set up a postfix server that works just fine when accessed as localhost. However I cannot make it available from the outside. The relevant configs are as follows: /etc/postfix/main.cf ...
0
votes
0answers
29 views

Prerouting with iptables, destination port to DHCP ip

I have an iptables rule that translates requests to the same IP from different internal hosts by changing the source port. iptables -t NAT -A POSTROUTING -p TCP -d 173.32.1.2 --dport 873 \ -m state ...
0
votes
1answer
17 views

Redirecting log from /var/log/kern.log to a separate log file for iptables log

I am trying to redirect iptables log to another file. Based upon my reading on the net, I did the following: In my iptables rule, I have rules like: iptables -A INPUT -s ... -j LOG --log-prefix ...
0
votes
0answers
18 views

Hairpin NAT with dynamic WAN IP [migrated]

I have a dynamic WAN IP so if it changes my iptables will no longer apply. Here is my working hairpin nat, where x.x.x.x is my WAN IP br0 - LAN eth1 - WAN -A PREROUTING -d x.x.x.x -p tcp --dport ...
1
vote
1answer
24 views

Route ipsec to openvpn with iptables

I am not a very experienced user but I do have determination, after a week with no progres it is getting rough. I have two NIC, one facing to the internet and one towards the internal network. Both ...
0
votes
0answers
28 views

Can access server via SSH/FTP but other protocols won't work

I followed this guide to setup an "Upside-Down Ternet." Everything was fine up until the part where I configured IPTABLES then I lost SSH connection. Now I expected that because I'm messing with ...
2
votes
1answer
38 views

An iptables rule doesn't work

I'm facing the following problem: I want to block the port 8000 being accessed from the network (block all connections except the ones from 127.0.0.1). So to simplify my problem and as a first step, I ...
-2
votes
1answer
36 views

SAVE IP ROUTE RULES AFTER REBOOT

I have two internet connections from two different ISPs and I need to balance & failover the traffic originating to and from my network between the two ISPs. My settings: FIRST ISP (eth0): ...
1
vote
1answer
23 views

Missing firewallD in CentOS 7 VPS

i fresh installed CentOS 7 in a OVH VPS. but when i ran the command firewall-cmd i got this: -bash: firewall-cmd: command not found so i was looking how resolve that and i saw that basically i ...
0
votes
0answers
17 views

KVM - libvirt qemu script make duplicates in iptables

OS: CentOS 7 Firewall: iptables libvirt: 1.2.17 Problem: I used guide to make port forwarding from host to gues machines. Link to guide: ...
1
vote
2answers
18 views

OpenVPN per user rules while not routing Internet traffic

EDIT: I know that learn-address is what I would need to use to call a script (as specified in the openvpn-netfilter project) to set the firewall rules. I guess my question is more related to the ...
-1
votes
1answer
23 views

How can I only allow TCP connections for 1 port using iptables on Unbantu? How can I also set a maximum packet on a connection?

I'm running a server for public. I just want to allow TCP connections and I want to limit the packet to prevent ddosing a bit and setting a maximum IP/new connections per seconds with iptables. How ...
0
votes
1answer
12 views

iptables port forwarding to specify ip

I use the following command to forward tcp 2222 in a host node to tcp 22 in a vm (192.168.0.100): iptables -t nat -A PREROUTING -i vmbr0 -p tcp -m tcp --dport 2222 -j DNAT --to-destination ...
-1
votes
0answers
29 views

Iptables Rules To Route Traffic Between Two Local Processes

I want to set up the rules in iptables of a system (10.1.1.25lan and 192.168.0.25wan) in such a way that any traffic (from other local systems, ex-10.1.1.x) with any 'original destination:port 111" is ...
2
votes
2answers
42 views

Check if iptables rules are working

I have three virtualboxs. 1) Virtual machine VM-A that works as a router with two interfaces: eth0 - 10.160.10.254 eth1 - 172.10.0.254 2) Virtual machine VM-B that works as an internal network ...
0
votes
0answers
19 views

netfilter, block port range [31000-32000] on public interface eth2

I need to block the port range [31000-32000] on my public interface eth2. Services can be accessed using private network interface eth3 I have tried : root@master-sbg-01:~/# iptables -A INPUT -i ...
-2
votes
0answers
23 views

CentOS Convert iptables rule to firewall-cmd rule [closed]

I have the following iptables-rules on CentOS 6: iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name ssh --rsource iptables -A INPUT -p tcp --dport 22 -m state --state NEW ...
1
vote
0answers
42 views

Drop fragmented packets in nftables

Using iptables is it possible to block fragmented packets with this rule: iptables -A INPUT -f -j DROP But there isn't a equivalent in nftables. There is any way to do it?
1
vote
1answer
32 views

Howto configure Ipset to block entire countries IPs

I need to block some countries using ipset and iptables. What I've done so far (create new ipset set 'geoblock'): sudo ipset create geoblock hash:net,port then I created the following script ...
0
votes
0answers
10 views

How to isolate two containers connected to the same bridge?

I have several LXD containers which are bound to a single bridge (the default lxdbr0 or another one, it does not matter). The host itself has another two interfaces, one ultimately connecting it to ...
3
votes
2answers
63 views

Ubuntu as NAT Gateway with iptables

I'm trying to configure Ubuntu 14.04 to act as a NAT gateway between a private and public network. Public Interface -> eth0 (178.x.x.x) Private Interface -> eth0:0 (192.168.206.190/17) I've tried ...
0
votes
0answers
12 views

Iptables linux routing with 2 chain proxies

Im trying to setup a connection between a PCs in my local network, to foreign resource XYZ in a specific way. My network is currently configured like this: I have a pc behind the proxies -> Then I ...
1
vote
0answers
13 views

Iptables multiple port redirects based on destination address

I have iptables setup for selective routing. In the current configuration it checks if the dst address is listed in a specific chain and if it is not it redirects the traffic to my proxy port which is ...
1
vote
0answers
17 views

Route all traffic from virtual interface to temporary tun0

I'm trying setting up at home an automated torrent client to download some big GIS databases I produce at work and release as .torrent files. My home server is a Raspberry PI with one Ethernet ...
0
votes
1answer
13 views

Edited IpTables, now SFTP suddenly stopped working

I removed some things from my IPTables that were no longer needed and now my SFTP simply times out upon attempting to connect with FileZilla: Status: Connecting to ###.93.110.###... Response: ...
0
votes
1answer
56 views

OpenVPN Ubuntu Server Routing Problems No Internet

I'm running OpenVPN on Ubuntu 15.04. When I connect to the server, I can connect and authenticate correctly (I use PAM auth because I'm lazy). Once connected I can't ping the server or access the ...
0
votes
1answer
54 views

Can't establish SSH connection even on localhost

Having problems getting a simple SSH connection to even localhost on my Ubuntu 15.10. Server was set up many months ago and was able to create access for SSH with keys, but cannot duplicate that ...
-1
votes
1answer
44 views

How can I block access to the internet for static addresses?

I have a router on CentOS 7 which provides access to internet for several IP addresses, which are reserved at DHCP server. Other hosts are blocked. If someone put static address from the reservation ...
-1
votes
0answers
16 views

OpenVPN Firewall management

I'm trying to restrict access to have and establish connection just from their offices. Example, we have 2 officess with x.x.x.x and y.y.y.y so i would like just from those two ip to have access and ...
1
vote
1answer
56 views

ICMP ECHO REPLY is not being SNATed correctly

I am trying to provide L3 connectivity between two remote LAN networks (10.0.0.0/24, 10.0.1.0/24) using OpenVPN with the following setup: +----------------+ +---------------------+ ...
0
votes
0answers
56 views

CentOS 5.11 apf/iptables; iptables sometimes fails when apf restarts

On one of our old servers, a CentOS 5.11 machine using apf as a front end for iptables, we're having an intermittent problem with iptables failing when apf restarts on occasion. When this happens, the ...
-1
votes
0answers
25 views

CentoOS / Apache Cant reach webserver

I have CentoOS 7.2 and Apache/2.4.6 The Iptables are disabled/stopped. SeLinux is also disabled. setenforce 0 I can ping the sites on my vhosts list from outside the network and also can ping others ...
1
vote
1answer
60 views

Allow Docker containers to use IPSEC VPN on host

I have Docker and an IPSEC VPN tunnel on my workstation, but the containers can't access hosts behind the VPN. Is there anything I can do, e.g. with IPTables or routes to allow access? [Note: I'm ...
2
votes
2answers
60 views

iptables / KVM forward port

I have a server with one external IP address (e.g. 1.2.3.4). On that server I use libvirt to run virtual machines. Now I want to access a virtual server on my host via ssh (port 1234) from the ...
0
votes
0answers
5 views

assign IP to tinyproxy on OpenWrt [migrated]

I have installed tinyproxy on OpenWrt and now I want to make rules for iptables that match traffic from tinyproxy. I want to mark this traffic with set-mark and route it to different routing table. My ...
0
votes
0answers
34 views

Route all the trafic using iptables nat in linux

I'd like to route all the trafic through iptables NAT in linux, I'd like to route all the traffic through TOR. My script is accepting only TCP and UDP protocols, but I need to route all the protocols ...
0
votes
0answers
59 views

IPTables - Redirect ppp0 traffic to external side eth0

I've some servers on 2 differents networks. On the first network ( many servers ), I've only one public IP adress (ex: 193.193.192.192) and a small local network ( 172.16.1.0/24 ) ; On the second ...
1
vote
1answer
60 views

Port Forwarding on DROP policy

I'm trying to do a port forwarding on port 80 to a virtualmachine. If I set default policy to ACCEPT on input, output and forward chains the forwarding works. However, if I put the policy on DROP and ...
2
votes
1answer
55 views

Docker - This site can’t be reached

I installed a tomcat image and ran a container: [root@MY_IP ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS ...