Stack Exchange Network

Stack Exchange network consists of 174 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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

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
0answers
6 views

iperf3 UDP not reliable with iptables drop random

I'm performing some local test on my network with iperf3 using UDP connections between 2 Ubuntu 18.04 hosts. But it seems that the UDP iperf3 connections it is not robust to support a random packet ...
0
votes
1answer
19 views

How to route or use iptables to forward one server port to client on different subnet

The setup (all is linux): client IP address: 192.168.2.15 (interface eth1) box IP address: 192.168.2.2 (interface eth1) box IP address: 192.168.101.11 (interface eth0) server IP address: 192.168.101....
0
votes
0answers
22 views

kvm: filtering guest traffic with iptables?

I have KVM guests running on a host which is connected via a rfc1918 LAN and a NAT firewall to the internet. I want the KVM guests to be able to route to machines on the internet, but i want to ...
0
votes
0answers
25 views

Block single port forwarding in Windows

I have a Windows computer with IP Forwarding activated. However, I want to forward everything except the traffic that goes to port 53 in UDP. In Linux, this is easily solved with iptables: iptables -A ...
0
votes
1answer
64 views

iptables Source NAT with Multiple NIC & Public IP Addresses Not Working

I just have a problem on the multiple NIC & IP addresses server. I've configured my Cent OS 7 server with an additional public IP address which belongs to eth1. When iptables source NAT enabled, ...
0
votes
1answer
23 views

iptables rules for drbd

I'm having a default DROP policy on the INPUT and OUTPUT chain configured for iptables and I am trying to configure proper iptables rules for two servers that mirror data via drbd. The resource ...
0
votes
0answers
6 views

Why do I need both an iptables input and output chain rule for receiving requests?

I've been trying to get a debian VPS digital ocean droplet running a node server to respond to external WAN requests without much success. The node server is pretty simple listening to port 45000 for ...
0
votes
1answer
24 views

IPTABLES is masquerading packages without explicit rule for that

I am running a simple expirement for validating some NAT concepts with IPtables. I have a Firewall with two interfaces connecting two networks: Network A - 192.168.0.0/24 - connected to eth0 - ...
0
votes
0answers
8 views

IPTables Load Balancing with Sticky Session (IP Affinity)

I been scouring IPTables module documentation on ideas how I can achieve load distribution with source IP session state affinity. Lets clarify, I am not load balancing, simply distributing packets ...
0
votes
1answer
22 views

ubuntu route traffic to specific remote port via another host

There are three servers: A, B and C. C exposes a service on port 8080 and a firewall rule allows connections from B only. I need to set up A and B so that A can access C too, through B. Please note:...
0
votes
0answers
26 views

Can I forward a packet twice?

This question is better illustrated: Client -> ServerA -> ServerB -> ServerC -> Host Say we want to establish a connection between Client and Host, but, we want to encrypt the traffic at ...
1
vote
0answers
24 views

iptables stopped translating DNS packets?

# iptables -t nat -S ... -A PREROUTING -d 217.xxxx/32 -p tcp -m tcp --dport 53 -j DNAT --to-destination 10.x.x.9 -A PREROUTING -d 217.xxxx/32 -p udp -m udp --dport 53 -j DNAT --to-destination 10.x.x.9 ...
0
votes
0answers
13 views

iptables DNAT to Virtual IP on the same server

I'm trying to setup a transparent proxy with multiple cluster. The proxy server with act as default gateway, which will redirect some specific package and forward everything else. This iptables rule ...
0
votes
0answers
10 views

How to migrate Linux iptables scripts to OpenBSD/macOS pf

I am building a VPN server on macOS based on this instruction: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-ikev2-vpn-server-with-strongswan-on-ubuntu-18-04-2, and stuck at ...
2
votes
1answer
23 views

Reducing number of static routes in VPN cluster

I'm trying to set up a high availability OpenVPN cluster for worker nodes that have a fixed ip regardless of which OpenVPN server they connect to. This is a requirement, as things are bound ...
0
votes
0answers
19 views

GRE Tunnel allowing access to internal IP

I need your help with iptables because i got stuck. Explainations: What I have ? Proxmox public IP: 91.121.83.XXX Proxmox VMs private IPs: 192.168.0.101 (192.168.0.0/24) Proxmox GRE tunnel IP: 192....
0
votes
1answer
13 views

linux port forwarding between two nics [closed]

I have a vicidial server running on suse. I have installed two nic cards. One nic connects to my local network and the other connects to the firewall. The config is as below: Nic 1 : 192.168.2.21 (...
0
votes
1answer
15 views

Forward incoming data on specific port to both local port and external ip

i want to forward all data coming to specific port to local application listing on that port and as well as to external ip. is it possible to do it using iptables or any other tool?
0
votes
0answers
18 views

Hostapd - Download speed artificially limited?

I am currently attempting to configure a virtualized Debian machine as a wireless AP, and have successfully gotten everything to work except the following: For some reason, wireless clients only ...
0
votes
2answers
79 views

Port forwarding for 100K+ IP's

I need to do port forwarding on my Linux (Debian 8) to intercept packets going through the machine. It needs to be based on source IP, so different ports for different IPs. I've though of using ...
0
votes
0answers
72 views

Gameserver tunnel - Internal IP forwarding [on hold]

i have some problems while developing a secured environment for direct hosting of game. My game uses udp/tcp and i have a tunnel via ip-2-ip with CentOS on public server and FreeBSD on gameserver. My ...
0
votes
0answers
25 views

How to forward traffic from internal node to external node using iptables

I've spent the greater part of the day learning about iptables. Here is the scenario I need help with: private-node-1 is connected to private-node-2 using eth0 public-node-1 is connected to public-...
0
votes
0answers
15 views

config iptables rules for pptp vpn

I used Setup PPTP VPN Server on CentOS 6 guid to setup pptp vpn on my server. Every things is fine and vpn work without csf and iptables. But when i enable csf / iptables i can't connect to vpn ...
0
votes
1answer
76 views

correctly routed responses to NATed packages via OpenVPN are rejected by client

I have the following setup: Dedicated server S with static public IP address on eth0 running OpenVPN as server on tun0 and performing NAT from tun0 to eth0 Gateway router G that is the OpenVPN client ...
-1
votes
1answer
17 views

What is the command to know IP that accessing our server with Iptables

May I know what is the command that I should use to get the output of all IP & its frequent while they are accessing my server? I need this command to know the frequency of IP that access my ...
0
votes
1answer
36 views

OpenVPN is not connecting to services behind it (iptables?)

After connection to openvpn i can not ping even vpn address (172.16.0.1) here is my vpn config: ##protocol port port 1194 proto tcp dev tun ##ip server client server 172.16.0.0 255.255.0.0 ##...
2
votes
2answers
213 views

Does it makes sense to configure iptables when you have configured AWS EC2 security groups?

We are using some Amazon EC2 instances with configured Security Groups (e.g. can SSH only from particular IPs -- sorry I cant post rules). Some time ago I checked iptables and it looked like there ...
0
votes
2answers
17 views

How to update an ipset name-based entry

I need to handle on my firewall (Firehol, which is then transformed into iptables) a few dynamic entries. In an ideal world I would use a name (instead of an IP address) which always points to the ...
0
votes
1answer
31 views

iptables nat redirect to port if port open?

I'm running a router that I need filter some http request by proxy for blocked some domain request. so how can I make sure connection always available to destination even when proxy down? I need: ...
0
votes
0answers
18 views

Bridge is loosing packets

I have a Router running OpenWRT 15.04. The Router has a dedicated Wifi Radio, which is internally connected to eth5. I am running 2 Wifi Networks on that Dedicated radio, one is running on vlan 3. So ...
0
votes
1answer
39 views

Redirecting OpenVPN traffic to Burp Suite

I have a Linux Mint VM that I spun up as a transparent proxy for iOS devices. My intention is to tunnel all traffic from the iOS device through the VM and intercept it with Burp Suite, as an ...
0
votes
1answer
51 views

IP Routing Issues OpenVpn

I have two servers in the same datacentre, running Ubuntu 16 Server A: 10.12.96.5 Server B: 10.12.96.4 Server A, is running OPENVPN Server. When I connect to server A using SSH, I can PING server B....
0
votes
0answers
7 views

Trigger agreement page automatically when connecting to Captive Portal [duplicate]

I have a WiFi hotspot setup using Hostapd and Dnsmasq. Everything works great, but I'm trying to trigger the sort of Terms and Conditions page you might see at a hotel or coffee shop after you connect ...
0
votes
0answers
51 views

Docker container hits iptables to proxy

I have two VPSs, first machine (proxy from now) is for proxy and second machine (dock from now) is docker host. I want to redirect all traffic generated inside a docker container itself over proxy, to ...
1
vote
1answer
47 views

Excluding fwmark(ed) Packets from Wireguard Tunnel

In the scenario described here, I ended up with this config in the client (the endpoint WG server has two public IPs) [Interface] Address = <ip_to_use>/32 PrivateKey = ...
0
votes
0answers
19 views

iptables smart loadblancer with geoip

I'm trying to setup load balancer via iptables that will forward new connection to the closest (geographical) node. I've seen examples of blocking traffic by country and was able to setup traditional ...
0
votes
1answer
51 views

How to refuse a domain name in Iptables?

I would like my web server to refuse to answer queries to a domain name. In Iptables I have added to my iptables file: -A INPUT -p tcp --dport 80 -m string --string "Host: mydomain.example" --algo ...
0
votes
0answers
37 views

Auto-trigger captive portal agreement page display

I have a WiFi hotspot setup using Hostapd and Dnsmasq. Everything works great, but I'm trying to trigger the sort of Terms and Conditions page you might see at a hotel or coffee shop after you connect ...
0
votes
0answers
40 views

IPTables with two networks and http server blocks system updates

I have a virtual machine environment where IP 192.168.1.50 is "Real machine" that has the Firewall and its connected to router (192.168.1.1), and with virtual machines as 172.16.0.1.. My virtual ...
0
votes
2answers
158 views

Route ONLY specific LAN through VPN

I have ONE PC with two internal LANS. 192.168.10.4 is internal LAN and 192.168.42.2is the ip that get it from my Raspberry. Raspberry connect via wifi from my wifi router, then run tor daemon and give ...
2
votes
0answers
38 views

OpenVPN - Hypervisors and VMs communicating by VPN through the internet

I'm pretty lost with this problem (maybe I say something silly =D )... I have two hypervisors (CentOS 7) connected by a VPN (OpenVNP). In this scheme I have two virtual machines (VMA0 and VMB0) ...
0
votes
2answers
42 views

How to tighten forward iptables forward chain for DNAT+SNAT traffic

I want my linux router/internet gateway 192.168.80.1 to forward port 9091 to 192.168.80.15:9091 when requested via LAN. I also want my router to forward WAN-originating requests on port 9091 to 192....
1
vote
1answer
17 views

Redirect traffic to local machine in local network otherwise to remote server

TP-Link repeaters allow to access their web interface through a certain domain when being connected to them. If you are not connected to them and access the very same domain, you see their website. ...
0
votes
0answers
16 views

nginx ERR_EMPTY_RESPONSE from my ip

i manage a VPS with some sites inside, running on nginx. Browsing a website from my wifi i get this error "www.[website].com non ha inviato dati. ERR_EMPTY_RESPONSE". The rest of the world view the ...
1
vote
0answers
28 views

OpenVPN/Iptables: Route wlan0 through tun0, but not traffic from local system

I've got a device running OpenVPN with eth0 (connected to internet), tun0 connected to VPN, and wlan0 running hostapd with clients. I want all the traffic from the clients to go through the VPN, but ...
1
vote
0answers
49 views

Rejected all local requests

Periodically something strange happens with our VM. At some point it's not possible to send request to services. Even if consul or redis are working, got timeout error: consul members Error ...
0
votes
2answers
50 views

Delete from iptables where source is X

I'm running iptables on Debian 8 and needs to make some dynamic adjustment of certain rules. So I'm looking for a way to something like: iptables -D WHERE -s = x.y.z So I can delete all rules from ...
1
vote
1answer
36 views

Route traffic over forwarded ipsec tunnel

Perhaps somebody can enlighten me... I think I have a problem in IPTables but no idea anymore... I have an IPSEC site-2-site tunnel between a pfSense server and a virtual machine with strongswan. I'm ...
0
votes
1answer
26 views

iptables NAT for Dockerized VPN Server

I want to setup a vpn server on my VPS using Docker. Many VPN servers like OpenVPN need firewall NAT rules and other firewall rules to work. as official documents suggests: You may have heard ...
0
votes
3answers
57 views

iptables consumes a lot of cpu when blocking many IPs

I run a public UDP based service on AWS. A few weeks ago, alarms starting going off that revealed a UDP flood attack was in effect. A few years back, as result of a previous DDOS attack, I updated ...