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 / ganesh

iptables -A INPUT -s 172.168.0.1 -p tcp --dport 80 -j ACCEPT
AND
iptables -A INPUT -s 192.168.0.2 -p tcp --dport 80 -j REJECT

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does in makefile do?

560


What is llvm used for?

520


Can I delete .bash history?

515


How do you create a text file in linux terminal?

522


What is cpu core in linux?

512






What command used for showing user info like Login Name, Canonical Name, Home Directory,Shell etc in Linux?

609


How do I get to root directory in linux?

571


What is makefile in unix?

542


What does uname do in linux?

541


What will happen when a system call is encountered in a user program?

1506


How do I list directories in linux?

560


Explain about lpr filename?

602


Write a command that will do the following: -look for all files in the current and subsequent directories with an extension c,v -strip the,v from the result (you can use sed command) -use the result and use a grep command to search for all occurrences of the word orange in the files.

838


How many linux commands are there?

606


Explain about sh?

588