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
Explain getopts command of linux?
How do I check memory usage on linux?
What is cpu in top command?
What are different command to check ram, process and hdd of linux machine?
Explain command grouping in linux?
What is ps command in linux?
How do I check if my cpu is overclocked?
How do I run multiple commands in linux?
What are linux commands useful?
What is $@ in bash?
Which command would you use if you want to remove the password assigned to a group?
Which command would you use to create a file system on a new hard drive?
How do I clear terminal command history?
What is build process?
You want to know how many lines in the kickoff file contains ‘prize’. Which of the following commands will produce the desired results?