I want to built a fire wall using iptables. My condition is
" inbound to 192.168.0.2 with a port of 80 from
172.168.0.1 should accept"

Answer Posted / shailesh shinde

iptables -I INPUT -s 172.168.0.1 -p tcp --dport 80 -d
192.168.0.2 -j ACCEPT

iptables -A OUTPUT -m state --state Established,new,Related
-j accept

Both required

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is s in permission linux?

515


How often do you use grep command and how in Linux operating system?

535


What is ps command in linux?

543


What does pwd mean in linux?

545


What is grep command?

529






What is build process?

566


What does cd do in linux?

655


What is bash history linux?

535


What does f mean linux?

528


Brief about the command kill PID?

592


If we transfer 100 files by ftp to remote server, how to know the files are successfully transfer or some file are not transferred?

545


What is the role of case sensitivity in affecting the way commands are used?

618


What are the commands in linux?

529


What the command used for list the contents of your home directory, current directory and all subdirectories?

519


Is cmake only for c++?

560