Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 5956

Block IP on UBUNTU 20.04 [closed]

$
0
0

I have two servers running Ubuntu 20.04, which I have connected using a udp2raw tunnel. On server one, I have a WireGuard VPN installed, and on server two, the clients connect to it and then through the tunnel to server one to access unrestricted internet.

Recently, I've been experiencing attacks on server two that I am unable to block. I have the IPs that are attacking the server, which are visible in the screenshot below. For example, IP 213.156.152.199. I have attempted to block this IP in all the input, output, and forward chains using the following commands, but it has been ineffective, and the IP is not being blocked.

Please advise on how I can block these IPs. Thank you.

The commands include:

sudo iptables -A OUTPUT -d 213.156.152.0/24 -j DROPsudo iptables -A INPUT -s 213.156.152.0/24 -j DROPsudo iptables -A FORWARD -s 213.156.152.0/24 -j DROPsudo iptables -A FORWARD -d 213.156.152.0/24 -j DROP

I try these commandssudo iptables -A OUTPUT -d 213.156.152.0/24 -j DROPsudo iptables -A INPUT -s 213.156.152.0/24 -j DROPsudo iptables -A FORWARD -s 213.156.152.0/24 -j DROPsudo iptables -A FORWARD -d 213.156.152.0/24 -j DROP


Viewing all articles
Browse latest Browse all 5956

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>