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
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 ...
0
votes
0answers
38 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
52 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
32 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
33 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
37 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
2answers
45 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
29 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
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
48 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
45 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
49 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
23 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
41 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
29 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
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 ...
2
votes
2answers
47 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
23 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 ...
1
vote
0answers
51 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
44 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
20 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
78 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
18 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
15 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
28 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: ...
0
votes
1answer
105 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
121 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
116 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
114 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
vote
1answer
86 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
136 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
45 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
114 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
111 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
100 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 ...
1
vote
0answers
15 views

IPsec and pinging rightsubnets

I have been racking my brain about this. I have openswan running and I have been able to get tunnels up. Unfortunately, when I try to ping computers on my right subnet, I am not able to get any ...
0
votes
0answers
41 views

`systemctl restart iptables` blocks everything

Was connecting through ssh to a Fedora 23 server and decided to restart iptables after adding a new rule: systemctl restart iptables. However the iptables never restarted, or was very slow to restart ...
4
votes
0answers
65 views

IPset Alternatives and Firewall Management

I have CentOS 7, Plesk 12, 8GB RAM VPS. I have around 1000 rules in my IPtables to block abusive users. But when reloading IPtables it takes 15 seconds to reload all 1000 rules. First of all, is it ...
2
votes
0answers
39 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
1answer
42 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 ...
0
votes
2answers
44 views

KVM - Access from an external computer to the Virtual Machine

I have the following setup: Notebook (IP: 192.168.1.100) Host: (IP:192.168.1.129) Both Notebook and Host are connected to a router (Internet IP:192.168.1.1)¨ The host (Host) has two virtual ...
1
vote
1answer
129 views

How would I get this routing to work between the two subnets? Unsure if i am over-complicating my network

I am attempting to operate 2 subnets, the first subnet on range 192.168.0.0/24 is free to access anything it wants, including machines on the second subnet. the second subnet on range 10.0.0.0/24 is ...
0
votes
1answer
32 views

PCI Scan failing at TCP Source Port Pass Firewall testing

I'm trying to get PCI scan PASS for my website, Scan failing at this step. The host responded 4 times to 4 TCP SYN probes sent to destination port 20 using source port 80. However, it did not ...
1
vote
1answer
24 views

utility of using ALL in --tcp-flags in iptables rule

I m wondering what is the difference between the following 2 --tcp-flags rules: 1) -p tcp --tcp-flags SYN,FIN,RST SYN,FIN,RST 2) -p tcp --tcp-flags ALL SYN,FIN,RST
-1
votes
1answer
37 views

Firewall rules on a hosting (dedicated server)

I am on Linux Debian Jessie 8.4. I have set up a web server. It seems to run fine. I'm just wondering, if I need the following firewall rules are ok for HTTP(S) server to be running fine. iptables ...
0
votes
0answers
25 views

multi gre tunnels to one IP

I have an issue with GRE tunnels after connecting multi-GRE tunnels with different IP's to the server, using this tutorial: http://wiki.buyvm.net/doku.php/gre_tunnel every GRE tunnel has interface ...
0
votes
1answer
25 views

OpenVPN block SMTP Access Server completely

I've tried almost all iptables rules to block smtp on openvpn server but still clients clients can access remote smtp servers on port 25. I'm using openvpn access server. It's creating two interfaces ...