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 / venkat

Command:
iptables -i INPUT -t filter -p tcp -s 172.168.0.1 -d
192.168.0.2 --dport 80 -j ACCEPT

Description:
-i --> Match the INPUT or inbound
-t --> Table name here default is filter
-p --> Protocol
-s --> Source IP
-d --> Destination IP
--dport --> Port number
-j --> Condition.

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is make in linux?

530


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

618


What is simple command?

528


You wish to restore the file memo.ben which was backed up in the tarfile mybackup.tar. What command should you type?

524


What is history command in linux?

553






How do you create a blank file in linux?

510


What does grep command do?

579


What does rmdir do in linux?

539


What is sudo bash command?

544


What is nbtstat command?

588


How do I find previous commands in linux?

543


What is the bash in linux?

540


What is gnu in linux?

531


What is cpu utilization linux?

537


How do I navigate in cmd?

539