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

iptables, ufw, and psad - scanned UDP port alerts from router and devices on home network

I have a fresh install of Ubuntu 16.04. I configured iptables, ufw (with gufw), and psad using instructions from https://www.thefanclub.co.za/how-to/how-secure-ubuntu-1604-lts-server-part-1-basics and ...
0
votes
2answers
625 views

Setting up iptables filter to allow Git

Sorry I am new at this server stuff, so bare with me and if I'm missing any info let me know! I'm trying to setup my Ubuntu 14.04.2 LTS server to have a solid iptables firewall. Right now I think it ...
0
votes
2answers
52 views

iptables - access to port 3306 timeout

I cannot connect to mysql from a remote server. I have bind-address commented out but when I add rules in iptables to block other connections the requesting server's connection times out. I tried ...
0
votes
3answers
93 views

IP forwarding on Linux

I have three machines Source Machine Destination Machine - IP 10.20.30.40 Intermediate Machine - Host server1.test.com Source machine has SSH access to Intermediate machine and Intermediate machine ...
0
votes
0answers
52 views

OpenVPN DNS resolution not working

I'm currently trying to get a simple OpenVPN setup working and I'm almost there, except for a DNS (or routing) issue I seem to be having. The client connects to the server just fine, and I can ping ...
0
votes
0answers
84 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
23 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
38 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
vote
0answers
56 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
0answers
90 views

Migration of ebtables arp rule to nftables

I'd like to move to nftables (Ubuntu trusty, kernel 3.19). However I wonder how to migrate ebtables rules for ARP packets: -p ARP --arp-op Request --arp-ip-src 192.168.178.237 --arp-mac-src 2:fb:...
2
votes
1answer
182 views

nftables alternative for iptables -F

Simply, is there any quick alternative of iptables -F command (that just "deletes everything") for nftables? Such thing wouldn't have much theoretical purposes, but it's usually a lifesaver for ...
0
votes
0answers
63 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 ...
2
votes
4answers
6k views

Expert iptables help needed?

After a detailed analysis, I collected these details. I am under a UDP Flood which is more of application dependent. I run a Game-Server and an attacker is flooding me with "getstatus" query which ...
2
votes
1answer
144 views

Iptables are blocking WildFly10 on CentOS 7

I've CentOS 7 server without firewalld but with iptables installed. There's WildFly 10 is running with changed socket binding http port 8080 to 80 in standalone.xml. I'd open 80 port in iptables ...
0
votes
0answers
10 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 ...
2
votes
1answer
38 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
40 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
73 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 ...
11
votes
3answers
25k views

Why do ICMP Redirect Host happen?

I'm setting up a Debian box as a router for 4 subnets. For that I have defined 4 virtual interfaces on the NIC where the LAN is connected (eth1). eth1 Link encap:Ethernet HWaddr 94:0c:6d:82:0d:...
1
vote
1answer
34 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 ...
1
vote
2answers
67 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 ...
0
votes
0answers
43 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 --...
1
vote
1answer
30 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 ...
3
votes
2answers
86 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
25 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: http://wiki.libvirt.org/page/Networking#...
0
votes
0answers
29 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
55 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 ...
0
votes
1answer
45 views

policy routing to guests on other server

After long searching I've found the answer to my challenge, but the last step fails. I have two identical servers that both serve multiple guests. The servers have two interfaces: one for the ...
-2
votes
1answer
50 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): 152....
1
vote
1answer
67 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
1answer
99 views

OpenWRT reroute all router traffic through a Client

I have an OpenWRT router (192.168.1.1) with various wired and wireless clients (192.168.1.x). One of the clients is a Suricata Sensor (192.168.1.100) with only one, 1000MBbit NIC. I want to ...
1
vote
1answer
3k views

Any help on how to use iptables to postroute to eth0:2 alias in ubuntu?

On my server I want to route my internet traffic over my eth0:2 alias. When I use this command: sudo iptables -t nat -A POSTROUTING -s 10.8.0.4 -o eth0:2 -j MASQUERADE It returns this: Warning: ...
-1
votes
1answer
33 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 ...
1
vote
1answer
62 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 /usr/...
0
votes
1answer
13 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 192.168.0....
2
votes
3answers
113 views

What does -P INPUT ACCEPT mean with regards to iptables?

I'm fairly new to iptables, and am trying to figure out if I've configured my ruleset appropriately. With regards to the -P INPUT ACCEPT part of my question, I am trying to determine if this is valid ...
2
votes
2answers
48 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 ...
5
votes
2answers
2k views

OpenVPN bypass on some ports

I have a server running Debian 7 and I would like to connect to a VPN and let all the traffic pass via the VPN except for some ports (SSH, hosted websites, etc). I've searched for some time now in ...
0
votes
0answers
26 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
42 views

Block incoming traffic in bonding mode when primary interface is down

My server running on latest kernel (4.4.6) has configured a bond device (bond0) with two enslaved interfaces eth0, wlan0 with primary interface eth0. cat /proc/net/bonding/bond0 Ethernet Channel ...
0
votes
0answers
26 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 ...
0
votes
0answers
19 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
16 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
40 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
14 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: ...
1
vote
1answer
112 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 ...
0
votes
1answer
157 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
182 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
45 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
vote
1answer
168 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: +----------------+ +---------------------+ +----------------...