Questions tagged [iptables]

iptables allow creation of rules to define packet filtering behavior.

Filter by
Sorted by
Tagged with
2
votes
1answer
38 views

fail2ban and iptables rules flood (resulting in poor bandwidth)

I've noticed this pattern happening a few times on my server in the last 6 months: First, fail2ban detects many SSH attempts from bots, and sucessfully bans them. Indeed in /etc/fail2ban/jail.conf I ...
0
votes
0answers
17 views

Forcing all DNS traffic to unbound DNS server unless specific IP

I currently have a Linux box as my gateway running Debian 10 Buster. This machine runs an unbound DNS server that I use to re-route DNS requests to different servers depending on what host is being ...
1
vote
0answers
30 views

How can I restrict the network access of a systemd service?

I have a custom systemd service which I want to restrict to the local interface. On ctrl.blog systemd application firewalls examples I found that it should be possible to achieve this using only the ...
0
votes
0answers
9 views

Cannot connect to SQL from remote

I set up a Microsoft SQL Server on Debian 10, but I cannot connect remotely from my SQL Studio. Connection Timed Out. (Only working if I connect via SSH Tunned in DBeaver to address 127.0.0.1:1433) I ...
0
votes
1answer
31 views

Get netfilter statistics on the command line

I am finally switching from the old iptables to the new netfilter (specifically using firewalld) to configure my computers and servers but so far I have failed to find any newer alternative to the ...
0
votes
0answers
13 views

Does Docker normally fail to clean up its iptables rules?

I'm on Alpine Linux 3.13.2, iptables-1.8.6-r0, and docker-20.10.3-r0. I'm trying out Graylog 4 using their sample docker-compose .yml file. I got Graylog running as expected, then did docker-compose .....
-1
votes
0answers
18 views

Routing Rules with VPN

Im newbie with this network things and need some help. I have setup like this ---------- ---------- ---------- | A | | B | | C | | 10.x.x.x |-------| ...
0
votes
1answer
21 views

Forwarding ports through OpenVPN server to local server (Ubuntu 20.04 x64)

The Goal Hello, I have run into quite a wall when it comes to figuring out my issue of forwarding ports through my remote VPS to my local home server. What I am trying to do is host a Counter Strike ...
1
vote
0answers
14 views

How to redirect all traffic to SOCKS4 proxy using iptables?

I don't know much about iptables. I want to send all of traffics to specific SOCKS4 proxy. I don't have installed tor on my system and I'm not gonna use it. I know proxy don't work like a VPN. I tried ...
1
vote
0answers
24 views

Blocking FTP Brute Force Attack with Snort

I am trying to become familiar with Snort, and for this reason, I have set three VMs. A Kali, a windows machine with XAMPP and Ubuntu where I installed Snort. I believe I have Snort running in ...
0
votes
0answers
5 views

iptables: default policy overriding explicit rule

I'm trying to setup iptables rules, so that an openvpn server will only allow access to certain VPC subnets, if the client is in a particular subnet. I'm defining the rules like so.. iptables -A ...
0
votes
0answers
14 views

Understanding output of iptables -L, ip rule show (policy based routing), and ip route with multiple tables

I'm looking for is a good explanation of how to interpret the output of iptables -L and ip rule show in conjunction with the ip route show table <table_name> commands. I am struggling to ...
1
vote
0answers
14 views

iptables cgroup filter not matching

I need to make sure only specific services can access my vpn's virtual interface. From what I can tell, using iptables to filter based on process cgroup membership is the cleanest way to do that. So, ...
0
votes
1answer
30 views

Iptables forward port traffic to another port with byte calculation

Problem I want to 'redirect' traffic from one port to another. But I need to be able to calculate how much INPUT AND OUTPUT bytes were used in communicating through that port. Half Solution iptables -...
0
votes
1answer
26 views

Forwarding port to remote server?

How can I forward a local port to a remote host/port? I have tried using: sudo iptables -t nat -A PREROUTING -p tcp --dport <PORT> -j DNAT --to-destination <DESTINATION_SERVER>:<...
1
vote
1answer
25 views

Ubuntu 20.04: Service only runs after user first logs in

I'm trying to setup an openvpn server which uses nat to give users access to a number of VPC's in AWS. To do this I'm running the command... iptables -t nat -A POSTROUTING -s 10.10.0.0/24 -o ens5 -j ...
1
vote
1answer
56 views

Wireguard on a VPS with 2 public ip addresses

This is slightly confusing for me. I have 1 VPS server, which has 2 IP addresses (WAN) What i want to do is NAT each ip to route traffic to certain peers. What i have done is I made 2 wg interfaces (...
0
votes
1answer
27 views

How do I forward all packets from wlan0 to tun0 (OpenVPN)?

I have wlan0 and eth0. Eth0 is connected to the internet and wlan0 is an access point. I connected to an OpenVPN server with the "--pull-filter ignore redirect-gateway" option so that it ...
1
vote
0answers
20 views

KVM Public bridge, VMs not getting IPs

I've created br0 on the HOST with a single eth interface, it receives an IP and I can access it over ssh from other hosts in the network: br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu ...
-1
votes
2answers
120 views

Blocking outgoing requests to specific domains e.g. facebook, twitter

I'm finding that Firefox and Chromium are both ignoring my /etc/hosts file. Is there a way for me to block all outgoing requests to a particular set of domains e.g. Facebook.com and Twitter.com. For ...
1
vote
0answers
23 views

How does UFW avoid logging connection attempts on closed ports? [closed]

I noticed that I only seem to get "[UFW BLOCK]" entries in my logs for ports where something is actually listening. At least this is what it looks like to me. Is that actually a feature that ...
0
votes
1answer
18 views

UFW how to log packets allowed by a certain rule?

I noticed that GUFW has the ability to turn logging on and off by rule, but I see no options with ufw -h that I can turn logging on for a rule On ubuntu: To Action From -- ...
0
votes
1answer
17 views

Iptables: Does it make sense to use --source flag in OUTPUT?

Suppose I have a router with at least 2 interfaces, 192.168.10.254 and 192.168.20.254, linked to two different networks with 24 bits masks. Would the following iptables command be any different if we ...
1
vote
1answer
10 views

iptables DROP policy on INPUT causing 10+s of latency in SQL responses

I am trying to lock down my db server but have encountered something I cannot explain. Chain INPUT (policy DROP) num target prot opt source destination 1 ACCEPT tcp -- 0.0....
1
vote
0answers
21 views

Creating iptables rules based on traffic?

Is there a solution (besides doing "-j LOG" and manually geting the rules) for iptables where I can start a "recoding" for the traffic on a Linux server and based on that a script/...
0
votes
1answer
40 views

What is the difference between iptables -s and iptables-save

iptables -S prints one set of rules, but iptables-save prints a superset with a bunch of additional rules. What is the difference? And why doesn't iptables -S print the additional rules? For example, ...
0
votes
1answer
48 views

Route traffic from a daemon through a specific interface

I have a server with two interfaces: eth0 and dummy0, both have different public IP. How to route all traffic from specific program (daemon) through dummy0, using iptables? I want the daemon to ...
0
votes
0answers
4 views

problem sending smtplib attachments

I have a problem when I want to send attachments through python, I ask it here because it works locally, but when migrating it to the server (Debian 10, Container in PROXMOX) it arrives corrupt for ...
0
votes
2answers
30 views

iptables - INPUT DROP ignore FORWARD rules?

I recently got a client-VPN at one of my Debian servers in my home network. I want to use it as another gateway in my network for certain devices. This is something I have succeeded with so that is ...
1
vote
1answer
41 views

use socat as a service 24/7

We have a server which main focus is to stream data from one point to another. e.g. transfer data form 192.168.0.10:5000 to 192.168.0.20:6000 transfer data form 232.0.0.1:5000 to 192.168.0.20:6000 ...
0
votes
0answers
10 views

Django-App deployed in network with Gunicorn /NGINX - not accessible on private IP

I deployed a DjangoApp following this documentation: https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-debian-10 The aim is to make the app ...
1
vote
0answers
36 views

OpenVPN client as a gateway: Ping from server to client works, but gateway does'nt

I have a working OpenVPN server up and running on an OpenWRT router, and want to use an OpenVPN client as a gateway for some local machines that are connected to my router. What i have done / What ...
1
vote
0answers
11 views

Why iptables rule to limit packet 2048/s becomes 2500/sec when listed out?

I created the following IPtables rule: -A INPUT -p udp -m udp --dport 123 -m limit --limit 2048/s -m conntrack --ctstate NEW -j RATE-LIMIT When I list out the rule with the command iptables -L, the ...
0
votes
0answers
29 views

Something is modifying my iptable, can it be traced?

I've got the following command in my iptable: -A FORWARD -o enp0s3 -j ACCEPT That somebody doesn't like, because after 2 reboots, it's gone from the iptable... I've got iptables-persistent installed, ...
3
votes
1answer
73 views

iptables recent module: remove entries older than

I am using iptables recent module: -A INPUT -m recent --rsource --name PORTSCAN --set -j DROP The above line adds offending IP addresses to /proc/net/xt_recent/PORTSCAN. Now I am looking for a way ...
0
votes
0answers
20 views

Native Packet Dropping on ChromeOS

is it possible to drop packets by IP address in ChromeOS? I've heard of the packet_capture, which is the tcpdump equivalent for ChromeOS, but is there something similar to iptables to drop packets? I ...
0
votes
0answers
67 views

Docker: Restricting inbound and outbound traffic using iptables

We have lot of applications that run on Linux server using Docker. As an example, let us say my application runs on ServerA as a container (Docker). CONTAINER ID IMAGE ...
0
votes
0answers
39 views

IPTables/Docker setup routing packets to INPUT chain instead of FORWARD

I am running several installations with docker and iptables in place. One purpose of these installations is the forwarding of syslog messages. From time to time I experience outages in that network ...
0
votes
0answers
46 views

Can UFW work with iptables-persistent?

I used a script to set up iptables rules and then made them persistent with iptables-persistant. This is described here as a means to prevent a certain user sending traffic over eth0 so it can just ...
0
votes
2answers
33 views

Run a shell script upon connection to port 445

My machine currently has port 445 open to the internet. I'm looking to see how frequent scans of this port are and I plan to achieve that by running a shell script when someone connects to this port. ...
1
vote
2answers
29 views

Receiving ping packets despite blocking incoming ping packets

I used this command iptables -A INPUT -p icmp --icmp-type echo-request -j DROP to block the ping packets my computer receives, however the ping google.com command still starts getting ping packages ...
0
votes
1answer
33 views

Limit the Https port

I want to prevent my Servert to DDOS Attack. I want to write a rule via iptable to prevent. I want to write that rule “ Can not connect more than 10 clients simultaneously on Https port of my Server.” ...
0
votes
0answers
43 views

Detecting IP/MAC spoofing using iptables

Is there any way to detect IP or MAC address spoofing with iptables?
1
vote
1answer
33 views

PPTP VPN Ubuntu no web access

I've set up a PPTPd server on an Ubuntu 18.04 machine with kernel 5.0x, am able to connect to it from a Win10 machine, ping the server and ping 8.8.8.8. So DNS works over VPN. However, I'm not able to ...
2
votes
0answers
44 views

Filter non-IP traffic on STA wlan0 interface

I want to filter inbound and outbound non-IP traffic going through the wlan0 interface of a Raspberry Pi 3B+ (connected via Wi-Fi to an AP). iptables / ip6tables only seem to affect IP traffic, so ...
0
votes
1answer
42 views

How to send a traffic from Linux machine A to linux Machine C Via Linux Machine B, when all linux machine are in same network?

I have 3 VMs A,B and C which are running on Ubuntu. Those VMs are connected like follows :- A (eth0/10.1.1.10) <------>(eth0/10.1.1.20)B(eth1/10.1.1.30)<------------>(eth0/10.1.1.40)C ...
1
vote
1answer
40 views

What steps must be taken to manually setup a shared internet connection?

I am looking to find out exactly what steps must be taken to manually provision a shared internet connection on a workstation running a Linux based operating system. I am aware that when using any ...
0
votes
1answer
36 views

Request to virtual ip is not forwarding while trying IP Failover using keepalived on centos 7

I am trying to test IP failover using keepalived on centos 7. I have three instances of centos 7 installed on my vm. So I have 3 servers. I am trying to run keepalived on two of them, 3rd centos will ...
0
votes
0answers
27 views

iptables routing on multiple virtual interfaces

I have 1.1.1.1 outside, which is the public interface of vm1 in azure. VM1 has 192.168.1.1 an internal IP. In addition there's also 1.1.1.2 (virtual) which is attached to the same interface and is ...
2
votes
1answer
15 views

No packets show up in the POSTROUTING chain

My iptables setup: $ sudo iptables -S -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A FORWARD -j LOG --log-prefix "forward:" $ sudo iptables -t nat -S -P PREROUTING ACCEPT -P INPUT ...

1
2 3 4 5
46