Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
04-09-2005, 01:19 PM
|
#1
|
Member
Registered: Dec 2004
Location: ca
Posts: 61
Rep:
|
iptables command/iptables GUI?
Hey All,
I have two questions. First, if i wanted to block an ip or ip range what is the command to do so? Secondly, is there a GUI which manages iptables?
Cheers,
Cesar
|
|
|
04-09-2005, 01:37 PM
|
#2
|
Member
Registered: Aug 2003
Posts: 150
Rep:
|
iptables -A INPUT -i eth0 -s ip.to.be.blocked -m state --state NEW -j DROP
for instance:
iptables -A INPUT -i eth0 -s 61.31.1.100 -m state --state NEW -j DROP
would drop inbound packets to eth0 from that ip ...
iptables -A INPUT -i eth0 -s 61.31.0.0/24 -d any/0 -m state --state NEW -j DROP
would drop packets from 61.31.0.0 - 61.43.255.255
alot of folks use "firestarter" as a gui to iptables, can't say that I have, but it seems fairly popular.
|
|
|
04-10-2005, 08:54 AM
|
#3
|
LQ Guru
Registered: Jul 2003
Location: Los Angeles
Distribution: Ubuntu
Posts: 9,870
|
Quote:
Originally posted by zeos
iptables -A INPUT -i eth0 -s 61.31.0.0/24 -d any/0 -m state --state NEW -j DROP
would drop packets from 61.31.0.0 - 61.43.255.255
|
actually, that example would only drop packets from 61.31.0.0 - 61.31.0.255...
BTW, IMHO it's simpler and more effective to block the IP or subnet without specifying the packet's state... like, for one IP:
Code:
iptables -A INPUT -s 61.31.0.112 -j DROP
or for the whole subnet:
Code:
iptables -A INPUT -s 61.31.0.0/24 -j DROP
just my two cents...
Last edited by win32sux; 04-10-2005 at 09:15 AM.
|
|
|
04-11-2005, 12:49 AM
|
#4
|
Member
Registered: Dec 2004
Location: ca
Posts: 61
Original Poster
Rep:
|
Thanks a lot guys! I appreciate it
|
|
|
04-12-2005, 11:47 AM
|
#5
|
Member
Registered: Oct 2003
Location: King George, VA
Distribution: RHEL/CentOS/Scientific/Fedora, LinuxMint
Posts: 370
Rep:
|
maybe give "guarddog" a try as well for GUI
|
|
|
04-12-2005, 02:43 PM
|
#6
|
Member
Registered: Dec 2004
Location: Bay Area, California
Distribution: Fedora Core 3
Posts: 65
Rep:
|
I use Gnome and I just go to System settings>Security and configure it from there.
|
|
|
All times are GMT -5. The time now is 12:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|