Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
Rate limit forwarded ports with UFW?
Post Body

I am running Debian on a VPS that acts as a firewall for my home server and have set up UFW to forward certain ports for a service I run.

Said service is experiencing a DDoS attack and I want to try to mitigate it by limiting the number of connections allowed per OP per time. How is this done?

I currently have in /etc/ufw/before.rules:

# NAT table rules *nat

:PREROUTING ACCEPT [0:0] -A PREROUTING -i eth0 -p tcp --dport 12:34 -j DNAT --to-destination 1.2.3.4

:POSTROUTING ACCEPT [0:0] -A POSTROUTING -s 1.2.3.0/24 -o eth0 -j MASQUERADE

COMMIT # End NAT table rules

Author
Account Strength
100%
Account Age
12 years
Verified Email
Yes
Verified Flair
No
Total Karma
47,033
Link Karma
3,471
Comment Karma
42,875
Profile updated: 4 days ago
Posts updated: 2 days ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
3 years ago