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 the use of ls command?
Why is it called bash?
How do I search bash history?
What is SFC command?
Why do we use cmake?
What does the ps command do in linux?
What are grep patterns called?
What is finger in networking?
How do you insert comments in the command line prompt?
What is phony in makefile?
Explain about sh?
What is tty name?
What command should you use to check the number of files and disk space used and each user’s defined quotas?
What is git command?
How do I run a shell script?