Questions tagged [iptables]

GENERAL IPTABLES SUPPORT IS OFF-TOPIC. Support questions may be asked on https://superuser.com. An application that allows administrators to configure the packet processing tables provided by the Linux kernel firewall. Use this tag only for questions on programming with iptables. Questions about configuring iptables should be asked on Server Fault (https://serverfault.com/tour).

Filter by
Sorted by
Tagged with
0 votes
0 answers
49 views

How to forward a port to docker using iptables?

There are 2 networks created from separate docker-compose.yml for release and beta and 2 containers created from separate docker-compose.yml for release and beta. It is required to create port ...
Вячеслав Поспелов's user avatar
-2 votes
0 answers
25 views

Iptables rule for reverse proxy using Wireguard [closed]

My internet provider gives me a cgnat connection, so I don't have a public IPv4. So I now have a VPS with public IP and a Wireguard server running on it. In my homelab there is a VM with nginx proxy ...
crally's user avatar
  • 21
0 votes
0 answers
8 views

Rerouting ssl command fails during build of application through Elastic Beanstalk

I have a spring application that I am deploying through Elastic Beanstalk. When running a container command to reroute ssl the build fails. The command I'm trying to run is: iptables -t nat -A ...
Argentum's user avatar
0 votes
1 answer
120 views

Pod Stuck in Terminating State Due to iptables 'Chain Already Exists' Error in Kubernetes [closed]

I'm facing an unusual issue with a Kubernetes deployment using the Mailu Helm chart, specifically the mailu-front component. After updating the deployment, the newly created pod works fine, but the ...
Artichoke's user avatar
  • 111
-1 votes
0 answers
72 views

Is it possible to obtain iptable config changes with netlink and how?

I want to use netlink protocol with C/C++ to get informed about changes in iptables - if possible also about violations. I've already read a while about netlink and the usage of it but I'm confused ...
whiteshepherd's user avatar
-2 votes
1 answer
21 views

How to pass "Source UID" to iptables?

Through command line, am setting firewall rules using iptable binary like below: iptables -I PRIO_IN -p tcp -s "10.0.0.25/24" -d "10.0.0.26/24" -j ACCEPT For above rule, now I ...
Karma Yogi's user avatar
0 votes
1 answer
29 views

Nomad with docker secure client ports strategy

After having tried several deployment strategies with Nomad docker containers with traefik on the front, I'm encountering the unresolved problem of ports on clients dynamically opened by services that ...
heralight's user avatar
  • 928
0 votes
1 answer
56 views

Docker, Nomad, NetworkManager, and multiple interface routing

I'm trying to test out running a Docker container via Hashicorp Nomad that can have open ports on multiple networks. A use case would be a traefik load balancer with an 'outside' and an 'inside' ...
Jeff Bilbro's user avatar
0 votes
1 answer
110 views

I can't run iptables inside the container CENTOS - 7.9 OR ROCKYlinux 8.8

every image centos-7 or rocky-linux 8.7+ that I download on my ubuntu.2204 machine when I build it with all the packages I need, the only one that I can't run when I save this image and load it into ...
codevb's user avatar
  • 95
-1 votes
1 answer
18 views

Change port number while forwarding

In a larger firewall the following two lines allow me to connect from the internet to an SSH server running on the LAN host 172.27.255.4 and listening on ports 1046 and 22: iptables -t nat -A ...
felix's user avatar
  • 59
0 votes
0 answers
53 views

Unable to Block Kubernetes Ports in iptables

I'm currently working on securing my Kubernetes server by blocking certain ports using iptables. I've applied the following rules to drop traffic on specific ports: -A INPUT -p tcp -m tcp --dport ...
Samoed's user avatar
  • 1
-1 votes
1 answer
50 views

GCP overriding iptables rules in centOS

I created a CentOS machine from base image that can be found in GCP. After powering on I looked at the iptables rule, seems like everything is on I removed all the firewall rules and chained ones as ...
user1258028's user avatar
-1 votes
1 answer
54 views

How to add rule with IPTables.Net to iptables in real system with .NET 6 Web API

I have a .NET 6 Web API application and I want to edit my iptables rule in hosted system. (the system that Web API run on it) I have rule like below -A INPUT -m tcp --protocol tcp --source 2.2.2.2 --...
sorosh_sabz's user avatar
  • 2,576
1 vote
0 answers
33 views

Ping a Container within "Docker in Docker"

I know it's a little bit strange setup. I create two containers con1 and con2. con2 is extended from docker:dind which allows me to run docker containers within a docker container. The container which ...
Jayser's user avatar
  • 381
0 votes
0 answers
48 views

How to make IpTable Rules immutable in linux

I work on Linux and want to add rules to iptable. I want these rules to be immutable anyway (either changed or deleted). What should I do? Note that for me the rules that are running and kept in ...
amirsalimi's user avatar
0 votes
0 answers
84 views

Real ip in nginx container

I have docker container with nginx nginx.conf events {} http { log_format custom '$remote_addr - $remote_user [$time_local] ' '"$request" $...
Benjamin's user avatar
  • 541
1 vote
0 answers
111 views

Failed to start docker.service - Docker Application Container Engine

I'm trying to run the docker daemon. But I'm facing the following error. How to fix it? failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to ...
NobinPegasus's user avatar
0 votes
1 answer
40 views

VPC Peering Connection stopped working after installing Docker

I have two VPCs connected through Peering Connection. Each VPC has one EC2 instance. The Peering is working as I can ping from one EC2 instance to another using their private IP. Now I need to have ...
Tapas Bose's user avatar
0 votes
0 answers
221 views

How setup Wireguard VPN to acces AWS VPC private network

I want to configure an Amazon EC2 instance with WireGuard to establish a Virtual Private Network (VPN) and enable access to private instances within my Amazon VPC. This is my network setup: VPC: 10.50....
ajotaops's user avatar
0 votes
2 answers
131 views

How do you close Docker containers to the outside world?

I want to close my containers running in Docker to the outside world. Brute-force attacks are constantly coming to my mysql port. I don't know how to prevent it. I add rules in ip tables, rules don't ...
CodAvo's user avatar
  • 223
0 votes
1 answer
64 views

Ununtu 20 + Rancher 1.6 — 80 port issue

I have two servers running Ubuntu 20.04 (fresh intallation), each has Docker installed. One of the servers (Server A) hosts Rancher 1.6 (rancher/server), while another one (Server B) has rancher/agent....
Rodion Baskakov's user avatar
1 vote
0 answers
382 views

Calico + ipvs/strict_arp kube-proxy + Metallb l2 mode multi interface problem [closed]

i am playing around with metallb in l2 mode and iptables routing on a ubuntu 22.04 system with 2 interfaces. I have ens160 (on all nodes master + worker) for all the local traffic and ens192 (only on ...
OLED01's user avatar
  • 19
0 votes
0 answers
84 views

How to modify iptable in Android without rooting the device

My product is based on Android 12, we have complete control of the BSP source and the built-in apps in this product, and we can always OTA to update the products which already been sold to customers. ...
Qiao's user avatar
  • 452
-1 votes
1 answer
270 views

Linux netfilter / iptables : How to enable iptables TRACE chain handling with nf_log_syslog on RHEL8+?

On a Linux RHEL8 system, I have enabled these iptables rules , which I am led to believe should enable ICMP packet syslog logging on interface ingress & egress : # iptables -L -t raw Chain ...
JVD's user avatar
  • 655
0 votes
1 answer
64 views

iptables INPUT rules not work as excpected

I have a Linux server which have docker installed. And I want to config INPUT chain to restrict some of trusted IP connection. So, I added some ACCEPT rules, and changed default POLICY of INPUT chain ...
Donghua Liu's user avatar
  • 1,856
0 votes
0 answers
21 views

cannot connect to proxy

I created a docker container with ubuntu image. it has sstp-client and connected to sstp server. default route is the virtual interface that sstp creates. now I want to use it as a proxy server on ...
FIFO's user avatar
  • 41
2 votes
2 answers
786 views

How to resolve iptables error "Couldn't load match 'conntrack'" in docker container?

I have a Windows 10 host with Docker running. Inside Docker I run two Rust container. I would like to set up a Firewall inside one of them. The Compose File: version: '3' services: outer-endpoint: ...
max23's user avatar
  • 21
0 votes
0 answers
164 views

Iptables failed in Yocto image running docker compose

After seeing several posts in stackoverflow and some other blogs, I still couldn't get rid of some iptables issue. I created a Yocto image (x86) with the following recipe: require recipes-core/images/...
waas1919's user avatar
  • 2,395
1 vote
0 answers
512 views

How to resolve 'getaddrinfo EAI_AGAIN' error when launching Docker containers on WSL? docker launched with 'sudo dockerd --iptables=false'

Docker containers on WSL not connected to the internet when launched with "sudo dockerd --iptables=false". "npm ERR! request to https://registry.npmjs.org/rxjs/-/rxjs-6.6.7.tgz failed, ...
Rida Elmaaroufi's user avatar
-1 votes
1 answer
215 views

iptables FORWARD chain set to DROP, rules for tagged traffic don´t forward pakets from one interface to another

I already searched everywhere, also on stackoverflow but didn´t find an anwser. I tried a lot and didn´t see something like that prior. **Host01: ** Has two functions: Act as a docker host (https://...
HiLTastic's user avatar
0 votes
1 answer
377 views

How to restrict a Docker container to only access specific ports on the host and allow SSH traffic

I have a Docker container that needs to have access to certain ports on my host machine, but I want to restrict access to only those ports. Here's the command I use to run the container: docker run -...
mehran rahnama's user avatar
0 votes
2 answers
125 views

Programmatically use iptables-restore when special character exists in log-prefix

I am writing a program that takes a snapshot of iptable rules so that they can be restored at a later point. I don't want to write the rules to a file; I store them as a string in my code. This worked ...
incubus's user avatar
  • 719
0 votes
0 answers
44 views

Docker expose GRE

Requirement: i need to forward all the GRE traffic to my docker container (it's a microservice analysing network traffic sent via ERSPAN) As per https://docs.docker.com/engine/reference/builder/#...
user2913139's user avatar
0 votes
0 answers
67 views

Binding specific container to specific physical interface

I'm struggling with Docker for almost a week. Setup: eth0 - 192.168.1.0 - default eth1 - 192.168.2.0 - secondary docker-network - 172.20.0.0 When I trigger curl https://ifconfig.me/ on the host ...
MateW's user avatar
  • 52
3 votes
0 answers
1k views

Distributed training with torchrun on 3 nodes connection timeout

I have a problem with running a distributed training of pytorch using torchrun. first of all, this is the script I try to run: import torch from torch.utils.data.distributed import DistributedSampler ...
Morteza's user avatar
  • 56
0 votes
1 answer
67 views

Problems connecting to node-network from a remote host with iptables firewall

I have an ubuntu 22.04 LTS server with a container running nodered exposed on port 1880, I want to restringer with iptables. My configuration is as follows: iptables -P INPUT DROP iptables -P OUTPUT ...
Victor Cornejo's user avatar
0 votes
0 answers
34 views

Unable to create container based image in docker

Im working in oracle cloud and pulled an image from docker hub. But when tried to create a container based image, I get error. docker: Error response from daemon: driver failed programming external ...
Techmaster 's user avatar
0 votes
0 answers
49 views

Docker Swarm Network isolation

I have following escenario: 3 hosts running swarm. 1 net used for interhost communication NetX(192.168.10.0/24) 2 net that have to be accessed Net1(192.168.30.0/24), Net2 (192.168.20.0/24) What I ...
Erick Vivanco's user avatar
-1 votes
2 answers
145 views

pods have no access to the internet [closed]

I have a freshly created kubernetes cluster set on 2 nodes, both nodes are open to the internet. I can curl, ping etc. any web. The problem appear when I try to do the same from pod. eg. curl to ...
RedBluff's user avatar
0 votes
1 answer
975 views

fatal: unable to access 'https://gitlab.com/project.git/': Could not resolve host: gitlab.com

I've been tearing my hair out for a few days trying to find a solution. My gitlab runner is unable to connect to git repos with the error: fatal: unable to access 'https://gitlab.com/project.git/': ...
djecko06's user avatar
1 vote
0 answers
346 views

Cannot start docker service after fresh docker install

Problem I just installed Docker on my arch machine with sudo pacman -S docker Just after that I tried to initialize Docker services with sudo systemctl start docker.service it is showing this error -...
Priyanshu Jha's user avatar
0 votes
0 answers
43 views

Open docker internal network to access an specific server

I have a docker ecosystem with jupyterhub where I have configured the network as internal, so the containers (jupyterlab instances) cannot access anything outside the network they are connect to. ...
jlanza's user avatar
  • 1,218
1 vote
1 answer
184 views

Raspberry pi access-point routing not working [closed]

I have setup an access point on my raspberry pi 4 following this guide: https://www.raspberrypi.com/documentation/computers/configuration.html#before-you-begin I can connect to the wireless network, ...
Martijn's user avatar
  • 23
0 votes
1 answer
182 views

'ipset add' from python script

I have existing ipset mylist, which I created with this command: ipset create mylist hash:net Now, I would like to be able, from my python script, to add IPs to this list. This is the command I ...
Martin Vegter's user avatar
-1 votes
1 answer
34 views

Understanding iptables output for filtering packets

I am working on one sles12 system where IPTables are configured in this way: num target prot opt source destination 1 ACCEPT tcp -- anywhere anywhere ...
John T's user avatar
  • 1
0 votes
1 answer
194 views

Container Listener not working on IP Address from server - Only works on IP from the Docker Network

SUMMARY I am running a Zabbix Server container, but I am not being able to communicate on its listening port - Locally even. OS / ENVIRONMENT / Used docker-compose files This is the script I am ...
Raul Chiarella's user avatar
0 votes
0 answers
92 views

Apply docker's iptables rules after injecting my own rules (easywall)

I'm running Matrix via ansible-playbook (https://github.com/spantaleev/matrix-docker-ansible-deploy) on a vps and I recently installed https://github.com/jpylypiw/easywall to set up iptables rules on ...
roughnecks's user avatar
1 vote
0 answers
127 views

Holepunching failing with linux iptables

I am trying to test a custom made hole punching library. I want to setup a simulator using Docker. There are 3 subnets: 2 nated ones (172.30.0.0/16 and 172.31.0.0/16), with one Debian machine each ...
Remi D's user avatar
  • 553
0 votes
0 answers
71 views

Python\C\iptables block UDP

I'm dealing with a DDoS issue on my server. It's actually called a spoof/flood attack. So, I came up with the idea to create a couple of scripts to collect valid IPs and detect the attack on the ...
Victus's user avatar
  • 11

1
2 3 4 5
41