Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [iptables]

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

0
votes
1answer
27 views

Routing from one server to another with different interfaces

Server A: eth0 IP: 10.x.x.x eth1: 88.x.x.x (vlan with id 10) Server B: eth0 IP: 10.x.x.x From outside I can ping the 88.x.x.x IP. Server A can ping Server B. On Server B I disabled the ...
0
votes
1answer
25 views

How to forward ports via iptables while making that port also being listened?

I'm forwarding a port from my HOST (192.168.1.4@MY_LAN) to my virtual machine (10.0.10.5@HOST) with the following iptables rule: HOST:~$ iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j ...
0
votes
0answers
15 views

Iptables LOG causes No chain/target/match error

I have used the following commands to build a chain in iptables: iptables -N logaborted iptables -A logaborted -j LOG However, whenever this is run I get the following error: iptables: No chain/...
1
vote
1answer
33 views

Fail2ban bans IP, but not until it already has hundreds of requests

I have a jail that picks up on a specific user agent. It eventually bans it, but it still gets by with several hundred requests. Here is the relevant info (unless anything else is needed): Ban ...
-1
votes
0answers
11 views

how do I add a correct UFW rule to allow gupnp-av-cp application to control TV on the local area network? [on hold]

I am on Ubuntu 16.04 platform. I use gupnp-av-cp application to play, pause, volume up/down, stop in short to control media buttons on TV which is connected to local area network. But When I enable ...
0
votes
1answer
32 views

iptables rejects vpn client by port

Here is my iptables commands: sudo iptables -F sudo iptables -A INPUT -p tcp -s 109.123.74.85 --dport 27000 -j ACCEPT sudo iptables -A INPUT -p tcp -s 188.170.80.4 --dport 27000 -j ACCEPT sudo ...
0
votes
0answers
11 views

Iptables limit flag usage

I've tried adding a iptable rule sudo iptables -A COUNTER -m limit -n --limit 1024/sec --limit-burst 1024 -j ACCEPT But when i try to see the rules using iptables-save -c or iptables -nvxL the ...
0
votes
0answers
6 views

cloud-netconfig: adding address many to interface eth0

We have IPTABLE (Natting) Server with SLES 12 running on Azure. We have multiple IP s assigned on Network Interface of a VM but not configured them within Guest OS. The purpose of this is to create ...
-1
votes
0answers
13 views

How to rate limit incoming traffic into a server so only x/min visitors can enter

I am trying to rate limit the oncoming traffic to my servers. I figured using iptables (on centOS) would be the best choice. I have been looking around and discovered a few solutions: sudo iptables --...
0
votes
1answer
22 views

Does a proxy consume same bandwidth as origin?

i want to setup a proxy server using NAT rules. My question is: using the linked method, does the proxy consume same bandwidth as the origin server? Or only the origin consumes bandwidth and the ...
0
votes
1answer
58 views

From specific source IP to specific destination IP with ip route or ip tables

Problem I've already created different IP aliases, (each with a different virtual Mac Address too) this way on my shell: ip link add link eth0 address 00:11:11:11:11:11 eth0.1 type macvlan ifconfig ...
0
votes
0answers
9 views

iptables firewall not working on ftp and internet surfing on the pc server [closed]

I am new in the world of the iptables and i need to make a restrictive policy on my debian server, but is not working when i try to use ftp from windows and my website is not charging the images from ...
0
votes
1answer
22 views

add an IPTables entry on Linux to let out Redis

On my Windows machine Client (name it WIN) I installed a VirtualBox Ubuntu Linux Mint Redis Server (name it LS), attached to the local network as Bridged Adapter. On my LS I have $ hostname -I 10.14....
1
vote
0answers
52 views

how to redirect android traffic to proxy

I know that Android does not support wpad (pac files), and I also know that port 443 can not be redirected. So, This is what I have: For example, asssuming the squid-cache proxy port is 3128 (eth1 ...
0
votes
1answer
39 views

Linux Log all tcp new connections

On my linux host I want to get per minute logs of all the new tcp connections being created. I have multiple tap devices on my host from which various are trying to create the tcp connections. I ...
0
votes
0answers
22 views

Connection refused from signle host Ubuntu

I have an Ubuntu 16.04 running on machine A. It has a docker container running inside of it, which exposes the port 8080 to the outside (this is where the server(Wildfly) that is running inside the ...
0
votes
0answers
31 views

Port 25 Connections Unknown - Should I DROP them?

I have a Zimbra Mail Server setup, and have noticed quite a few connection attempts on port 25 which are rejected because the reverse lookup fails. Here is an example output: Apr 30 06:04:48 mx1 ...
0
votes
1answer
47 views

ip6tables on IPv4 only host

If external interface has only IPv4 address assigned and IPv6 automatic link local, does it make sense to set up ip6tables? I'm asking as I am not sure how it works exactly. If, for example some ...
0
votes
1answer
25 views

Ubuntu 18.04 LTS apply iptables changes FTP/FTPS PASV mode

I am trying to set iptables so a CLIENT computer can use FTP/FTPS with passive mode. I have already set majority rules by ufw - short extract (skipped listing of IPv6 and other rules for the sake of ...
1
vote
2answers
28 views

Cannot apt-get behind my iptables rules

I'm trying to configure a new server's iptable. Here are my rules inside a firewall.sh script that I execute: #!/bin/bash # Ports recap: # ---- web: 80, 443 # ---- mail: 25 (smtp), 465 (smtps), 143 (...
1
vote
0answers
14 views

Iptables / Ip6tables - a few questions

So, i was working on my iptables. #!/bin/bash iptables-restore < /etc/iptables.test.rules iptables -F iptables -X iptables -t nat -F iptables -t nat -X iptables -t mangle -F iptables -t mangle -X ...
0
votes
0answers
35 views

Cannot ping ubuntu into ubuntu via ssh

yesterday, everything on my ubuntu server 16.04 was working fine (as it did for a few years before), but all the sudden today it doesn't work anymore. So what's not working anymore: I cannot ping ...
1
vote
1answer
32 views

does netfilter-persistent reload open up the gates for half a moment?

I have iptables set up to block all outgoing traffic that tries escape outside my VPN connection. and netfilter-persistent to make iptables rules persistent. this all works perfectly. Now because ...
1
vote
0answers
35 views

Routing traffic through a host connected to the VPN gateway

I have a VPN set up where multiple subnets are used. I have three VPN services, let's say A - 192.168.1.0/24, B - 192.168.2.0/24 and C - 192.168.3.0/24. I would like to have specific traffic from a ...
0
votes
0answers
15 views

Docker swarm can't connect with openvpn tun0 interface

I'm running Traefik on docker swarm service. Traefik redirects to local Apache server at port 88 which is worked last time without docker swarm. My Traefik is running with network driver=overlay and ...
0
votes
0answers
21 views

iptables-services add rules automatically - troubleshoot

My environment : CentOS Linux release 7.6.1810 (Core) , I disabled firewalld and install iptables-services-1.4.21-28.el7.x86_64 , fail2ban to block brute force ssh . They work fine. I created an ...
1
vote
1answer
30 views

Iptables port forwarding on Ubuntu (Docker)

I have an Ubuntu Docker image running in Kubernetes and I'm trying to set up port forwarding to route requests coming in on port 5000 to a different destination and port (10.30.8.191:443). I installed ...
0
votes
0answers
13 views

Openvpn on server with multiple IP addresses slow upload speed

I have 2 ips on my server: venet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 inet addr:127.0.0.2 P-t-P:127.0.0.2 Bcast:0.0.0.0 Mask:255.255.255.255 ...
0
votes
0answers
9 views

iptables port mirroring causing infinite loop

I'm trying to use iptables to mirror incoming traffic from port 514 to port 1514 so that rsyslog can still get all it's messages from 514 and another application can see the same log messages. The ...
2
votes
0answers
23 views

having trouble with rsyslog forward and include origin IP or iptables mirror while using ufw

How do i get rsyslog to mirror traffic unmodified (including origin IP) to another port? I have many devices sending data into port 514 but i need two different applications on the server to receive ...
0
votes
1answer
27 views

Use iptables to filter HTTPS (with known key)

I need to filter an HTTPS URL using iptables, on servers where I have access to the keys involved in the SSL communications with the client. I have found lots of resources saying that this can't be ...
-1
votes
1answer
62 views

Cannot use a secondary IP for outgoing traffic

I have a server (Ubuntu 18.04) with multiple IP address in the same network device. This is the ip a return: 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default ...
0
votes
0answers
44 views

How to exclude gre tunnel from going through OpenVPN connection by default?

I'm bit at a loss here as I don't know how to do this. I have two servers connected via gre tunnel (A: 192.168.168.1, B: 192.168.168.2). Server B is running a TeamSpeak server which I connect to via ...
0
votes
1answer
24 views

IPSec Site-to-Site with two right subnets

There is VPN IPSec Site-to-Site. Left is Proxmox 5.6 with external gateway 1.1.1.1 and internal net for VMs 10.14.0.0/24 with gateway 10.14.0.1. Right is an office net with two subnets 10.0.0.0/16 ...
0
votes
2answers
87 views

drop fin packet with iptables rule

Os is linux mint 19, i want to setup a rule in iptables to drop the incomming FIN packet as a response of the FIN_WAIT_2 state. This for a given port. I want to test an application and need some ...
0
votes
0answers
26 views

Docker container not accessable from the internet

I have a problem with my Docker installation. I want to run a nginx server that is accessible via the internet. I took the following iptables rules from my old server, which runs nginx without a ...
-1
votes
0answers
31 views

NAT Port Forwarding Not Working, Config Check Please

I am attempting to setup port forwarding via NAT, however, I can not seem to get a port forwarded properly, can someone please give me a sanity check on this config. auto lo iface lo inet loopback ...
0
votes
1answer
41 views

Script to allow traffic to ports 53,22,443,80 and drop others, BUT I can't run apt-get update

I'm writing a script to drop all inputs and outputs traffic except traffic on those ports (53,22,80,443) but I can't apt-get update. #!/bin/sh # Flushing all rules iptables -F iptables -X # ...
0
votes
1answer
66 views

fail2ban not correctly modifying the iptables effectively?

I just installed fail2ban in NetinVM (a constellation of virtual machines inside a VM) so far so good, I install in a specific machine (10.5.1.13) where ssh is on 2222 (all on root) From other ...
0
votes
0answers
33 views

How can I forward a port to another computer but maintain the originating IP?

I need to forward traffic coming into a cloud-provisioned Ubuntu VPS at 1.1.1.100 on port 1234 to port 5678 on local Windows computer (192.168.0.200, which is behind a router at 2.2.2.200 / 192.168.0....
0
votes
0answers
46 views

Using iptables NAT to forward GRE tunnel

I have two hosts which need to have a GRE tunnel between them. In between the two I have a relay host which needs to perform NAT and forward the GRE traffic in either direction. grehostA --- ...
-2
votes
0answers
36 views

Connect to SSH without ICMP

So I mistakenly forgot to disable some half-finished persistent iptables rules on a remote system before it went through its daily reboot, and now it is dropping all ICMP traffic on ipv4 and ipv6. ...
1
vote
0answers
21 views

iptables: No chain/target/match by that name., but chain EXISTS

I have created a new chain with the following command iptables -N INPUT2 I then attempted to add a fire wall rule with the following command iptables -I INPUT2 1 -p tcp --dport 22 -m conntrack -...
2
votes
1answer
84 views

Docker breaks libvirt bridge network

This issue is driving me crazy. I run a fresh install of Ubuntu 18.04, with: ufw to manage the firewall a br0 bridge lxd and libvirt (KVM) I tried stock docker.io package and packages form docker's ...
2
votes
1answer
485 views

Change default interface docker container

I'm struggling with this problem for two days. Assumptions: Docker network (and interface) named docknet type bridge subnet 172.18.0.0/16 Two interfaces eth0 (Gateway IP: 192.168.1.1, Interface ...
2
votes
0answers
32 views

fail2ban expired bans not removed from iptables

I have recently installed fail2ban on Ubuntu 16, and it's working in that bans/assignments to jails is working correctly, but once the jail assignment expires, the banned IP remains in iptables as ...
0
votes
0answers
36 views

How to enable inbound traffic to specific port of the cotnainer and block all other outbound traffic?

I have two docker containers 'web server' and 'vnc server'. What I'm trying to achieve is: 'web server' should be isolated from the internet and can only be accessed from the host or the 'vnc server' ...
0
votes
0answers
44 views

iptables command , iptables: No chain/target/match by that name

So I'm trying to install and test out Github loadbalancer.For this I need to configure the proxy servers behind the loadbalancer. One of the last steps involved in configuring it is to configure ...
2
votes
1answer
61 views

How to block an IP for IPSec VPN connections?

This is my current IpTables setup: Chain INPUT (policy ACCEPT) target prot opt source destination ACCEPT all -- anywhere anywhere state RELATED,...
0
votes
1answer
34 views

Ulogd2 cannot find PCAP plugin?

I am trying to log the packet data from iptables with Ulogd2. So I wish to dump it to pcap file. But it does not seem to work. This error in syslog is: Apr 15 14:58:05 shiskey-HP-EliteBook-8470p ...