Once I needed to forward a port to a VPN server that had a gray IP address and was behind NAT.
Continue reading “Port forwarding in iptables on NAT server”Tag Archives: IPTables
Setting up nftables
In this article I will give examples of setting up nftables to replace the outdated iptables.
Continue reading “Setting up nftables”IPTables. Blocking by MAC address
In this article, I will show examples of blocking MAC addresses in IPTables.
Continue reading “IPTables. Blocking by MAC address”How to save IPTables rules
In this article, I will describe several options for saving IPTables rules so that they load when the operating system starts.
Continue reading “How to save IPTables rules”IPTables Rules for BGP
I will give an example of IPTables rules for BGP.
Continue reading “IPTables Rules for BGP”IPTables rules for SNMP
In this article, I will give an example of IPTables rules for SNMP.
Let’s say “iptables -P INPUT DROP” is the default, which is very desirable.
IPTables quick setup script
Sometimes it is necessary, for example, to delete all IPTables rules and to add only the necessary, so for convenience, you can specify them in the script, and then execute it.
Continue reading “IPTables quick setup script”How to configure IPTables
IPTables is a command line utility that is the standard interface for managing the firewall.
Continue reading “How to configure IPTables”IPTables rules for Asterisk AMI
Suppose the default “iptables -P INPUT ACCEPT” for all connections (and if DROP, which is very desirable, then we do not use all the DROP rules below, we only perform ACCEPT).
Since Asterisk AMI usually works on TCP port 5038, in order to open it we will execute:
Continue reading “IPTables rules for Asterisk AMI”Installing and using ipset
ipset – a tool consisting of a kernel module, libraries and utility, allowing you to organize a list of networks, IP or MAC addresses, etc., which is very convenient to use for example with IPTables.
Installation command in Ubuntu: