Header Ads

(Linux Command Line) Part 5 - Other Useful Command Line in Linux

Linux is an open source Operating System, mainly used on servers and mainframes due to its high stability, secured and free. This is part 5 of the serial Linux Command Line - Other Useful Command Line in Linux (CentOS, Ubuntu)

Serial Linux Commands:

Bonus: E-book "Total Linux Command Line", Download Here
(Linux Command Line) Part 5 - Other Useful Command Line in Linux
Other Useful Command Line in Linux

Other Useful Command Line in Linux

Linux Commands for Firewall setting

iptables -t filter -L 
Display chains of all filter tables 
iptables - t nat -L
Display chains of all NAT tables 
iptables -t filter -F 
Delete all the rules in the filter table 
iptables -t nat -F 
Delete all the rules in the NAT table 
iptables -t filter -X 
Delete all chain created by the user 
iptables -t filter -A INPUT -p tcp -- dport telnet - j ACCEPT 
Allow telnet connections to input 
iptables -t filter -A OUTPUT -p tcp --dport http - DROP 
Block HTTP connections to output 
iptables -t filter -A FORWARD-p tcp --dport pop3 - ACCEPT 
Allow POP3 connections to forward chains 
iptables -t filter -A INPUT -j LOG --log-prefix 
Logging on input chain 
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 
Config a PAT (Port Address Translation) on eth0 masking outbound packets 
iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp -m tcp --dport 22 -j DNAT --to -destination 10.0.0.2:22
Redirect packages addressed to a host to another host 

Other Command Line commands in Linux

(updating....)
Cheers!

No comments:

EasyTipz. Powered by Blogger.