Block all traffic incoming to your server with -d / –dport (destination port)
iptables -I FORWARD -p tcp -d 101.102.103.4 –dport 25 -j DROP;
The result will look like this in iptables:
[screenshot of the Source .. Destination .. Protocol info colums]
Run iptables-save to save this configuration if/when iptables is reloaded.
Block all traffic outgoing from your server with -s / –sport (sending port)
iptables -I FORWARD -p tcp -s 101.102.103.4 –sport 25 -j DROP
Do it for an entire IP range/subnet/network [keywords]
iptables -I FORWARD -p tcp -s 101.102.103.0/24 –sport 25 -j DROP

Lightning-fast VPS hosting with enterprise SSD storage, global data centers, and 99.99% uptime. Built for developers, trusted by enterprises.
support@solvps.com
1-888-256-8213
These cookies are essential for the website to function and cannot be switched off.
These cookies enable enhanced functionality and personalization, such as live chat or video.
These cookies help us understand how visitors interact with the website (for example Google Analytics).
These cookies are used to deliver and measure advertising (for example Meta Pixel, LinkedIn Insight, Google Ads).