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

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

Using SSH Tunnel Port Forwarding To Access Docker Web Service

I have a web application running on a public IP. It is accessed via HTTPS on port 443. I want to be able use SSH Tunneling to access it from my local machine. This works so far: ssh user@remoteip -N -...
0
votes
0answers
15 views

NAT+Database Port: Forward local port to remote Server

First, let me pose my immediate question, then I describe the whole context (as the context is a bit involved IMHO). Which IPtables allows me to access a postgres database on "ip.ip.ip.ip:5433&...
-2
votes
0answers
14 views

OpenVPN only route internal network [closed]

I want to provide a service to my friends, which should not be accessible from the Internet. So I have set up an OpenVPN server, which also works so far. However, I do not want other traffic to be ...
0
votes
0answers
23 views

Routing traffic for specific port range

I have a Ubiquiti Dream Machine (UDM) which is part of a project that is replacing a network topology with a different one. This involves both Internet traffic and VoIP (Asterisk). During the phased ...
0
votes
0answers
31 views

How to config nat 1to1 via iptable with iproute2 to VM

My English isn’t that good. I have two network: eth0: 192.168.1.2/24 gw 192.168.1.1 ....# Home internet. vxlan19: 10.0.0.165/24 gw 10.0.0.10 ....# VPN over wiregrude. vxlan19: 10.0.0.196/24 ..............
-1
votes
0answers
12 views

Forwarding traffic over single NIC w/ multiple IPs to other IPs on separate interfaces

I'm attempting to configure a machine to act as a gateway to two captive raspberry pis. Machine A, the "gateway", has 3 NICs. Machine A's eth0 is configured w/ multiple IPs (192.168.0.5/6/7)....
0
votes
0answers
36 views

iptables is not blocking traffic

I have set an INPUT DROP policy and allowed only my IP address to access the server. Still when using iftop / nload it shows tons of packets from different IPs addresses to port xxxx. Users report ...
0
votes
0answers
23 views

iptables -> ip6tables (convert)

I have the following iptables (ipv4) and need the same on ip6tables (ipv6) for an openVPN-Server: # Flushing all rules iptables -F FORWARD iptables -F INPUT iptables -F OUTPUT iptables -X # Setting ...
0
votes
0answers
21 views

Forward traffic on port to another host with transparent proxy

I have a host with ip $HOST_IP which runs an HTTP server on port 8080. There is a transparent proxy server running on port 9000 on host with IP $PROXY_SERVICE_IP. I'm trying to forward traffic from ...
1
vote
0answers
62 views

VoIP one-way audio, only when call initiated from one side

I am setting up some new switches and VLANs and I am getting trouble with our pre-existing Asterisk VoIP set-up. Most calls work ok. Some get just one-way audio. I tried to narrow it down to this ...
0
votes
0answers
21 views

may a linux client do prerouting with iptables

In our network I have 3 clients: A, B and C (connected to the same router). I tried to redirect the traffic that arrive to B on port 4440 to C on port 4441 using iptables-legacy simulating port ...
0
votes
0answers
9 views

Openvpn - Install-Script (angristan)

I want to use the following script to install openvpn on a little cloud-server: https://github.com/angristan/openvpn-install/blob/master/openvpn-install.sh It seems to me that the ip(6)tables that are ...
0
votes
0answers
17 views

how to redirect and mascarede iptables [closed]

I need to redirect the interface eth 19 with ip 192.168.1.228:8081 to the ip 10.0.67.245: 8080 through the interface eth18 with ip 192.168.0.2 since, due to network restrictions, only this ip can ...
1
vote
0answers
11 views

tun0 interface (created by opevpn) only useable as root

If I do curl ipinfo.io --interface tun0, it will hang forever. but if I do sudo curl ipinfo.io --interface tun0, it will work as expected. How can i make tun0 useable by non root users? tun0 is ...
0
votes
0answers
19 views

How to route traffic from nat interface through GRE Tunnel? - Debian

I have these two dedicated servers, let's call them A and B; I've created a GRE tunnel between the two and it works as supposed to. On server A, I also have a NAT interface configured and it works but ...
0
votes
0answers
15 views

Cant access http public IP Adress with google cloud compute engine

What did i do so far? I tried restarting apache2, i tried to see if the firewall was open but still nothing seems to work. Can someone help me, the public ip address suddenly changed and from that ...
0
votes
1answer
17 views

Iptables rules for UFW

I need the following rules implemented in UFW but don't know how to do this exactly: iptables -t nat -A POSTROUTING -o eth0 -s 10.8.0.0/24 -j MASQUERADE #Note: If you use tcp protocol you must change -...
1
vote
0answers
44 views

Host external port redirection while blocking target port externally and having docker running

This might be simple but after spending ~5 hours w/ iptables and googling, I couldn't make it work, so I thought I'll ask here directly. I have an ubuntu machine with Docker installed (so it ...
0
votes
0answers
14 views

Ipsec Site to Site

I have a closed ipsec tunnel in my dmz firewall for a bank, the tunnel network on our side is their topology, I need to make rules in an iptables firewall sending all traffic to this tunnel, where my ...
1
vote
0answers
16 views

executing script (to set iptables rules) over ssh blocks for 2 hours

I have a script with some iptables rules in it. When I execute this script on another host using 'ssh', then this call blocks for approx. 2 hours. This is the contents of the script. The idea is to ...
0
votes
0answers
13 views

iptables forwarding internal traffic to one ip to another

is it possible with iptables to forward internal requests on one ip to another? As a example: A hardcoded tool is requesting content from 10.0.0.10 on different ports, the Author of this tool stopped ...
0
votes
0answers
26 views

Some advanced IPTables routing

I'm trying to route some public and private IP addresses using Ubuntu Server 18.04 using iptables. Please note: I've changed the first bits of my IP Address for privacy, but kept it numerical for ...
0
votes
0answers
13 views

Packet routing (iptables, or other) [closed]

How can I redirect incoming packets (from the Internet) from one port to another? (TCP / UDP) More details: The server is running the Terraria game server software (TShock), it is listening on a ...
0
votes
1answer
35 views

Forwarding all traffic to transparent proxy

I want to redirect all of the traffic from my instance to another instance that’s running a transparent squid proxy, using IP tables rules and NOT changing the instance’s default route. is it done on ...
0
votes
0answers
14 views

ban domain in vpn Server

how can I block this domains in ubuntu I need to block access to this domains so my vpn clients can not access them I'm using Outline vpn server Adding them to host file didn't work :( auth.api....
1
vote
0answers
20 views

Linux iptables DNAT IP range to single IP

I have following rules iptables -t nat -I PREROUTING -d 192.168.0.2 -p tcp --dport 20001:20100 -j DNAT --to-d 169.13.29.133:80 iptables -t nat -I PREROUTING -d 192.168.0.2 -p tcp --dport 20101:20200 -...
0
votes
0answers
9 views

What is the best way editing iptables rules while using Calico network plugin

We are running Calico network plugin along with K8S's. We need to modify iptables rules for various reasons, but it seems does not always work well as we also have chains cali-XXX and KUBE-FIREWALL ...
-1
votes
0answers
27 views

Port forwarding from specific incoming IP to specific port

Is it possible to forward a particular incoming IP to a specific port? For example: specific incoming IP (port 80) > forward to server IP (port 1234) Only the one IP should get forwarded, all ...
0
votes
0answers
42 views

Access OpenVPN client from backend LAN servers

I've this kind of architecture. For the moment, the two OpenVPN client communicate well with backend servers on Azure (Black arrows). With this configuration on OpenVPN server : In /etc/sysctl.conf :...
0
votes
0answers
34 views

Influence source address selection to same destination with multiple interfaces

I have a system with two network interfaces, both connecting to same default gateway. I want to load balance the connections to the same destination IP made from the system across both interfaces and ...
-1
votes
0answers
25 views

Is IPTables blocking some traffic?

I have a Debian machine routing some internal networks (a wired network, a routed access point) which is connected to a Cisco ASA firewall via VPN (over a physical modem connection). The network ...
-1
votes
0answers
54 views

curl: (7) Failed to connect to example.com port 443: Connection refused

I set my addon IPs in netplan. I cant send requests by curl to another host. my server is new. Server: Linux Dedicated OS: Ubuntu 20 Addon IPs: 10 curl error: curl: (7) Failed to connect to ...
1
vote
0answers
27 views

How to limit packets per unit time on a particular interface (for vms)

I am using kvm and virtuozzo virtualization on my servers and each having 10 vms. I have to restrict DDOS attack from my VMS (i.e prevent VM from doing DDOS attack), I search on net and found that I ...
0
votes
0answers
17 views

Does IPTables make use of netfilters ingress hook?

I see that the ingress hook was added to the linux kernel in 2013. nftables makes use of this hook, was iptables ever updated to make use of it? I have found nothing so far to suggest that it does. ...
0
votes
0answers
17 views

iptables dropping connections from vpn

I'm attempting to limit connections to port 3306 to a range of a given IP address that corresponds to our local network. I'm running iptables -I INPUT -p tcp --dport 3306 -j DROP iptables -I INPUT -p ...
0
votes
1answer
16 views

Debian udp port fowrding to another server does not work?

I have PC A (192.168.255.126, eth1) and it will receive some UDP packets, port: 51000. Now I wish the PC A will automatically forward the UDP packets to PC B (192.168.255.127) I have found many ...
-1
votes
1answer
30 views

Fail2Ban is not updating iptables rules

I have set up fail2ban to protect my ssh port using these rather old instructions: https://www.digitalocean.com/community/tutorials/how-to-protect-ssh-with-fail2ban-on-ubuntu-14-04 I tested my set-up ...
0
votes
1answer
41 views

ufw route allow in on wg0 out on wg0 to 10.0.0.6/32

I use a WireGuard VPM to reversely connect to my home server via an external entry node. On that entry node, I try to add a firewall rule using ufw. Its purpose is to only allow routing to one and ...
1
vote
1answer
80 views

Does IPTable/Netfilter eat up ephemeral ports

I wanted to understand more about Netfilter architecture. Let's say I have a machine with 3 IPs. I configure one IP to SNAT to all 3 IPs in round robin. Can I open more than 64k connections from that ...
0
votes
1answer
43 views

How to route openvpn traffic through a second network adapter, to access the internet

I am running an ubuntu server with two network adapters eth0 and usb0, both with separate internet connections. The openvpn server is listening on eth0, and client can connect to the vpn using the ...
1
vote
0answers
19 views

Why the CLASSIFY action isn't applied by the iptables?

Why might the following simple iptables rule not work: iptables -t mangle -A POSTROUTING -p tcp --dport 1194 -j CLASSIFY --set-class 1:10 ? I'm trying to prioritize outgoing traffic to VPN. I am ...
1
vote
1answer
75 views

Failed to connect to 127.0.0.1:27017, connection refused

So I am currently trying to setup mongodb running and hosting locally for my centos machine. But when I try to connect I get this: #mongo MongoDB shell version v3.4.24 connecting to: mongodb://127.0.0....
0
votes
0answers
10 views

Service inside a docker-container can not reach port 993 of other docker-container after rule-change

The context I got two docker-containers: Container #1 is hosting an open source ticketing system Container #2 is hosting a mailserver The mailserver is up and running and I can connect to it using ...
3
votes
1answer
78 views

How to reset iptables rate limit counter?

I implemented SSH connection rate limiting using the following. iptables -N SSH_BRUTE_FORCE_MITIGATION iptables -A SSH_BRUTE_FORCE_MITIGATION -m recent --name SSH --set iptables -A ...
0
votes
0answers
25 views

OpenVPN icmp doesn't go all the way back

I have server : 192.168.5.77 openServerVPN : 192.168.5.202 client1 : 10.8.1.2 client2 : 10.8.0.3 When I ping server from client2 to server : server: tcpdump icmp -n -q 14:41:32.689212 IP 192.168.5....
-1
votes
0answers
22 views

Allow traffic between two subnets Openvpn

I have configured a vpn server of the type server 10.8.0.0 255.255.255.0 To isolate clients, I commented on the line client-to-client I block all traffic and allow some client clients to communicate ...
-2
votes
0answers
30 views

Using ufw to forward privileged port to non-privileged port

Is there a way of doing a local port forward using ufw and route allow? I've been experimenting with examples but many of these don't use ufw per-se, instead resorting to iptables, and none of these ...
1
vote
0answers
20 views

IPTable SNAT rule is not evaluated

I am trying to SNAT and DNAT a flow with IPTables and I am struggling with SNAT. The rule does not seem to be evaluated and I don't know why. Here are the rules: Chain PREROUTING (policy ACCEPT 117 ...
0
votes
0answers
23 views

Use working GRE tunnel as default on remote server

Purpose is to "protect" my backend dedicated server (B) using a front VPS (A) with a GRE tunnel and use the the new stablished interface (GRE1) as default on (B) in order not to leak the ...
0
votes
1answer
34 views

route ipv4 to ipv6 as mechanism to overcome not owning an ipv4 block for load balancing purposes on premise k8s (none aws/gcp)

This is not a question about tunnelling, although that may be part of a solution. With public cloud providers it's trivial to request a load balancer due to providers owning large class A/B/C public ...

1
2 3 4 5
120