Iptables

How to: Use iptables for port forwarding

Routers contain a pre-defined port forwarding function that allows you to forwards certain ports to computer or devices on your local network. In most cases, these routers are nothing but computers designed to move data from one port or another. Also, the routers are most likely running a variant of Linux and that the firewall is running iptables. Here’s how you can foward ports to hosts on a Linux machine using iptables.

How To Add A List Of IP Addresses To IPtables Using Bash Script

Say you have a list of IP Addresses that you would like to blacklist from trying to access your server. Whether you are preventing intruders or bots from accessing such services like SSH or your website. You want to make a simple list that parses IP addresses and adds them into IPtables. Here’s how you can do such a thing.