Using `iptables` on Linux @macheads101
Using `iptables` on Linux  @macheads101
Uploaded January 2014 | Updated November 2026, 2 days ago
In this video, I show you how to use iptables to firewall inbound traffic on your Linux server or home computer.

Here's some useful commands:

# enable all traffic on localhost
iptables -A INPUT -i lo -j ACCEPT
iptables -A OUTPUT -o lo -j ACCEPT
# list all rules
iptables -L -n
# accept traffic on HTTP and HTTPS
iptables -A INPUT -p tcp --dport 80 -j ACCEPT
iptables -A INPUT -p tcp --dport 443 -j ACCEPT
# set the policy to DROP
iptables -P INPUT DROP

# an extra one not shown in the video: this will allow all outgoing traffic for already established TCP connections. This is important if you limit inbound traffic as well as outgoing traffic.
iptables -A OUTPUT -p tcp --dport 513:65535 --state ESTABLISHED -j ACCEPT

# delete the fifth input rule
iptables -D INPUT 5
Using `iptables` on LinuxObjective-C: Automatic Reference Counting (Basics)Apple Watch + iPhone 6 EventApple Watch + Macbook EventJava Lesson 6 | java.lang.MathPrank Your Friends With Terminal (Update)C++ Lesson 2: VariablesJava Lesson 8 | Intro to using multiple classesDelete ANY App From LaunchpadHow to make Animated GIFsMore Detail on the Verizon iPhoneOur New Jitsik Website
macheads101 |

Using `iptables` on Linux

SHARE TO X SHARE TO REDDIT SHARE TO FACEBOOK WALLPAPER