Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

Explain getopts command of linux?

1073


How do I check memory usage on linux?

1036


What is cpu in top command?

994


What are different command to check ram, process and hdd of linux machine?

967


Explain command grouping in linux?

1021


What is ps command in linux?

959


How do I check if my cpu is overclocked?

991


How do I run multiple commands in linux?

989


What are linux commands useful?

1009


What is $@ in bash?

1056


Which command would you use if you want to remove the password assigned to a group?

902


Which command would you use to create a file system on a new hard drive?

1007


How do I clear terminal command history?

1039


What is build process?

978


You want to know how many lines in the kickoff file contains ‘prize’. Which of the following commands will produce the desired results?

952