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).

iptables
Filter by
Sorted by
Tagged with
0 votes
1 answer
2k views

Deleting Iptables -S of calico

I am trying to delete all calico related Iptables using calico-script . After running this script most of the calico iptables is removed except these: root@Ubuntu-18-VM:~# iptables -S | grep -oP '(?&...
solveit's user avatar
  • 1,049
0 votes
1 answer
2k views

Issues cross compiling iptables for arm

I am trying to cross compile iptables for ARM. I have tried versions 1.6.1 and 1.8.5 and both have similiar problems. iptables has three dependencies, libmnl, libnftnl and libnfnetlink. I have ensured ...
badri's user avatar
  • 595
0 votes
2 answers
2k views

Is it possible to set SO_ORIGINAL_DST value of a socket?

I'm trying trying to redirect a tcp connection to a transparent proxy without iptables. iptables is definitely not an option. Is it possible set original destination on a socket? Here is the code I ...
paddlesteamer's user avatar
0 votes
2 answers
190 views

Docker container cant connect outside docker0 [closed]

I have a server with docker that hosts 2 docker containers. These containers are running a Spring boot 2 application. In 1 container I want to connect to the other container and I am having timeout ...
Martijn Hiemstra's user avatar
0 votes
1 answer
6k views

IPtables not allowing yum in centos 7

I have set DROP as default rule for all in my centos 7 system and allow only following rules. #Allow web server ports iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT iptables -A INPUT -p tcp -m ...
Hafiz Muhammad Shafiq's user avatar
0 votes
1 answer
2k views

Multiple tcp services on the same port

I'm working on a project where some clients (embedded linux systems) needs to connect to a main server using so far at least two protocols: HTTPS and SSH. One of the requirement is that only one flow ...
Andrea's user avatar
  • 87
0 votes
1 answer
3k views

Iptables: Multiple -d flags not allowed(-dport and -d)

I tried to add a command like this in my iptables: sudo iptables -A OUTPUT -p tcp --tcp-flags RST RST -d 2.25.52.5 -dport 6784 -j DROP And I got iptables v1.4.21: multiple -d flags not allowed I'm ...
tartaruga_casco_mole's user avatar
0 votes
1 answer
442 views

How can I invoke a shell or Perl script from iptables?

We're using CentOS and would like to ban several Asian countries from accessing the entire server. Almost every IP we check which has tried to hack into our server is allocated to an Asian country (...
Y.K.'s user avatar
  • 300
0 votes
1 answer
2k views

Iptables from udp to tcp [closed]

Is it possible to convert all outgoing udp traffic from a gateway router to tcp on the same port with iptables. Have looked at mangle but unsure how I can use that.
user3270211's user avatar
0 votes
2 answers
1k views

Block Access to www.facebook.com in Android SO

I'm developing a framework for Android SO. I need to block a hostname, i.e. if I block a hostname, no connection is allowed to this hostname. The user will not be allowed to access this hostname by ...
Jorge Gabriel Siqueira's user avatar
0 votes
1 answer
221 views

How to extract all IP address using php [duplicate]

how to extract all ip address from a given string, please. eg: " 2014-07-08 19:05:20 1X4YpU-0001kr-6y <= [email protected] H=(server.takcloud.com) [185.4.28.203] P=esmtps X=TLS1.2:...
daslicht's user avatar
  • 823
0 votes
1 answer
12k views

IPTABLES error "iptables: No chain/target/match by that name"

iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port 8080 When I try to run this command, I run into the error: iptables: No chain/target/match by that name My iptables ...
user3642145's user avatar
0 votes
1 answer
484 views

mongodb remote connection problems

I took several days trying to configure my environment running linux mongodb without results. This platform is running on AWS EC2. mongodb is configured with auth=truecommented, and with port=27017 ...
user3491720's user avatar
0 votes
1 answer
1k views

Iptables to forward remote port to local port for local access

I have an application in an application in Docker container. I have the DB in another Docker container. The DB container has an exposed port of 49155. The application requires that the database be ...
Concordus Applications's user avatar
0 votes
2 answers
5k views

What ports do I need to leave open for kinit to work?

I'm trying to set up a client machine so that only kinit traffic works. So far, my rules look like :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT DROP [0:0] -A INPUT -i eth0 -s 192.168.1.130 -p tcp -...
user2679165's user avatar
0 votes
1 answer
3k views

Creating firewall rules using iptables

Is there any way to construct a firewall rule using "iptables" which filters packets on both input and output? I've only been able to find rules like the following which allow you to designate it as ...
exxodus7's user avatar
  • 562
0 votes
1 answer
632 views

IPTables block ALL packets to port 2001

so I need to block all packets to port 2001 in order to stop Chargen amplified floods on my server. Chargen amplified floods hit port 2001. This is what I have tried, but when I look in IPTraf, i ...
user2484067's user avatar
0 votes
1 answer
4k views

How to open port 2195 in iptables centos cpanel 11

Please help me. how to add 2195 port in iptables ...centos server and cpanel 11 installed.
user1543571's user avatar
0 votes
1 answer
2k views

Blocking Hotspotshiled?

I am responsible to monitor my university network and recently I have noticed which students are using a VPN called as "hotspotshield" that pass my proxy server and allow them to browse and use any ...
tokhi's user avatar
  • 21.4k
0 votes
1 answer
1k views

How large are iptables byte counters?

In other words at what point do they overflow and reset to zero. The iptables manual appears not to say. Are they 32bit of 64bit?
zoneblue's user avatar
  • 124
0 votes
1 answer
2k views

How to allow interaction between EC2-instances in the same firewall-group

Situation Let's take the following design: App servers DB servers - Server A - Server X - Server B - Server Y - Server C - Server Z Every app server is in both the app-server-...
cutsoy's user avatar
  • 10.2k
0 votes
1 answer
1k views

Storing output of a bash command to database

I want to store the output of iptables -vL command into a mysql database table. When I run iptables -vL it shows usage in bytes along with users MAC id's. I am planning to use awk to select two ...
nixnotwin's user avatar
  • 2,373
0 votes
2 answers
4k views

i just want to use the iptables command in my c program

i m designing a simple c code to call the iptables command according to the need. i just want to drop the packets from a particular ipaddress using my c code. thats why i have to use the iptables ...
neha soni's user avatar
0 votes
2 answers
4k views

Open ports under Fedora Core 8 (for VMWare Server)

I have just installed VMWare Server 2.0 on a fresh Fedora Core 8 install. The ports for the web access console of VMWare are 8222 and 8333 (like the defaults). When I try a remote http access to ...
Joannes Vermorel's user avatar
0 votes
1 answer
57 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
  • 29.3k
0 votes
2 answers
503 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
  • 263
0 votes
1 answer
2k views

Any alternatives to socat and netcat for port forwarding?

I need to forward an exposed port of a Docker container to a remote port of a remote server. There are two approaches. One is with IP tables, but this wouldn't work for me since I'm not able to give ...
wsh25's user avatar
  • 55
0 votes
2 answers
161 views

Block IPs that requested more than N times per minute from a log file

I want to block IPs that requested more than N times/min using iptables . I've sorted the log file using this script: cat $log_path | awk '{print $1, $4}' | sort -n -k 1,4 | sed "s/\[//g" 10....
Ali Abdi's user avatar
  • 418
0 votes
1 answer
2k views

Open docker port running on host network to outside traffic

How do I get my docker container running gunicorn / FastAPI server to respond to outside traffic? This is how my container runs docker run --detach --net host -v "/path/to/app/app":"/...
El Dude's user avatar
  • 5,496
0 votes
1 answer
573 views

Why is ICMP (ping) request blocked, when sending to HTTPS server when port 443 is blocked by iptables filter? [closed]

ICMP Protocol is not using either TCP or UDP as far as I understand doesn't use the concept of ports. So I blocked outgoing packets on port 433 i.e going to an HTTPS server: (sudo) iptables -I OUTPUT -...
Ariel Gluzman's user avatar
0 votes
2 answers
2k views

Access kubernetes external IP from the internet

I am currently setting up a kubernetes cluster (bare ubuntu servers). I deployed metallb and ingress-nginx to handle the ip and service routing. This seems to work fine. I get a response from nginx, ...
Jonaswinz's user avatar
  • 392
0 votes
1 answer
786 views

Access internet from device in network namespace

I have a device that is connected to my laptop via USB ethernet. But because i have more than one device connected like this with the same IP address, i created network namespaces. I was able to ...
Varyag's user avatar
  • 674
0 votes
1 answer
953 views

Unable to join docker swarm using Oracle Cloud VMs connected to the same VCN

I'm trying to use two compute instances in Oracle cloud as nodes in a tiny Docker Swarm (using Oracle provided Ubuntu 20.04 as base system). The problem is, that I can't seem to make a connection ...
pusrob's user avatar
  • 101
0 votes
2 answers
2k views

Syntax error in expression (error token is "INPUT (policy ACCEPT) | cut -d ' ' -f1)

Hi I'am recently started learning bash scripts, since I'm quite "green" so to speak I hope I can get some help. I have this problem that I just can't seem to figure out on my own. I want ...
ipeglin's user avatar
0 votes
1 answer
1k views

Is there any Limit on number of ports that can be exposed in kubernetes service?

I am trying to expose a service on 200 odd ports. Here is sample service yaml: apiVersion: v1 kind: Service metadata: name: multiport-server-large-port spec: type: NodePort selector: app: ...
Rajeev Kumar's user avatar
0 votes
1 answer
1k views

Docker server networking - reject incoming connections but allow outgoing

We use Docker containers to deploy multiple small applications on our servers that are reachable on the public internet. Some of the services need to communicate to each other, but are deployed on ...
Sp0tlight's user avatar
  • 409
0 votes
1 answer
2k views

How do I disable all the docker rules that are added to iptables for public accces?

I am using docker-compose and just found out all my exposed ports from docker-compose.yml are actually added to iptables to allow world access. No idea but this leaves me with a huge security hole. ...
chovy's user avatar
  • 74.2k
0 votes
2 answers
110 views

What iptables knows about pods?

Let's say we have 2 Nodes in a cluster. Node A has 1 replica of a pod, Node B has 2 replicas. According to this talk (YouTube video with a time tag) from Google Cloud engineers, a request which was ...
LEQADA's user avatar
  • 1,953
0 votes
1 answer
1k views

How to modify source IP for a Pod in Kubernetes?

To change the source IP to 100.101.102.103 for outgoing data to a specific destination, I modified iptables inside the container of a Kubernetes Pod by executing iptables CLI tool: iptables -t nat -A ...
losingsleeep's user avatar
  • 1,857
0 votes
4 answers
7k views

I can't seem to get Fail2ban to successfully ban IP addresses that are trying to authenticate against our email server [closed]

Recently, my manager installed fail2ban on our ubuntu 10.04 email server to ban ip addresses that failed to authenticate to our email server. As we monitor the system, we don't see the IPs that ...
Jess's user avatar
  • 43
0 votes
1 answer
685 views

How to restrict access from internet to containers ports on remote linux server?

I use docker-compose on ubuntu 18 on remote server. How, with iptables, can i block access from the internet to the docker port and only allow access to it from the localhost of this server? For ...
Tyler Brin's user avatar
0 votes
1 answer
247 views

Do AWS security rules make changes to IPtables?

I am curious to know how AWS security rules will be applied to host. After assigning AWS security rules, how the traffic flow is controlled. Is it via IP table updates? For testing, I added the ...
ac184's user avatar
  • 901
0 votes
1 answer
19k views

Connection timeout solving

I have a private ip server with soap service: http://172.28.93.206:8081/SMSD_SOAP1/RMIUniversalConnectorService?WSDL I can access it from local browser, it has basic auth, and all works properly. But ...
OverSteppe's user avatar
0 votes
1 answer
3k views

Can't reach Kubernetes service from outside of node when kube-proxy in iptables mode

I have a Single-Node (master+node) Kubernetes deployment running on CoreOS, with kube-proxy running in iptables mode, flannel for container networking, without Calico. kube-proxy.yaml apiVersion: v1 ...
Pricey's user avatar
  • 308
0 votes
1 answer
1k views

How can I change iptable entries using bash script?

I have an embedded Linux firmware running on a home router. When I run the following commands one by one from the terminal as root, it works without any errors and serves my purpose. I know this is ...
bAd bOy's user avatar
  • 33
0 votes
1 answer
10k views

Filtering out VLAN tagged packets on Linux bridge [closed]

I have the following IF configuration: eth0 --- br0 --- eth1 I receive udp broadcast transmission (on port 20000) on eth1 and do not want the bridge to forward it to eth0 (my wired interface). ...
Yakir Matusovsky's user avatar
0 votes
1 answer
2k views

How to enable xt_bpf module in iptables

I have run cat /proc/net/ip_tables_matches On my machine running Ubuntu 12.04 LTS to check for loaded modules, it doesn't list the BPF module.
user3855343's user avatar
0 votes
1 answer
1k views

Iptables error prevents Pod starting in Kubernetes

I'm setting up a Kubernetes cluster following Kelseys Lab: https://github.com/kelseyhightower/kubernetes-the-hard-way I have only set up one node so far. When trying to deploy a Pod, the following ...
fischerman's user avatar
0 votes
1 answer
400 views

Compiling iptables on OS X fails

wget http://www.netfilter.org/projects/iptables/files/iptables-1.6.0.tar.bz2 tar jxvf iptables-1.6.0.tar.bz2 cd iptables-1.6.0 ./configure make During the make step, I encounter errors: ../include/...
fisherman's user avatar
  • 10.8k
0 votes
1 answer
5k views

Route traffic from internal network (eth1) through openvpn (tun0) [closed]

I have two virtual machines both of them in the same internal network (eth1) but only one (the gateway) is actually connected to internet (via eth0) and has openvpn running (on tun0). In the VM-...
patacca's user avatar
  • 19

1
18 19
20
21 22
41