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 are the command prompt commands?
What are grep patterns called?
How do you ask politely?
What is echo command in batch file?
Describe the mknod command and when you’d use it.
Who is unix command?
What is the command can be used to check for file corruption?
Explain getopts command of linux?
Explain the working of command grouping?
What is linux pwd (print working directory) command?
What the command used for list the contents of your home directory, current directory and all subdirectories?
What is kill command?
What is tty in linux command?
What is the bash in linux?
What is ls command and what it does?