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
What is make in linux?
What is the role of case sensitivity in affecting the way commands are used?
What is simple command?
You wish to restore the file memo.ben which was backed up in the tarfile mybackup.tar. What command should you type?
What is history command in linux?
How do you create a blank file in linux?
What does grep command do?
What does rmdir do in linux?
What is sudo bash command?
What is nbtstat command?
How do I find previous commands in linux?
What is the bash in linux?
What is gnu in linux?
What is cpu utilization linux?
How do I navigate in cmd?