Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th January 2008, 03:14
wpwood3 wpwood3 is offline
Senior Member
 
Join Date: Oct 2007
Location: Atlanta, GA USA
Posts: 197
Thanks: 21
Thanked 31 Times in 21 Posts
Question iptables Bastille not blocking

I'm trying do some local testing with iptables and am having a problem...

My ISPConfig server is on 10.0.0.6
My laptop is on 10.0.0.21

I want to block all access from my laptop to my ISPConfig server.

I entered these commands on my ISPConfig server:
Code:
 
iptables -A INPUT -s 10.0.0.21 -j DROP
iptables -A OUTPUT -d 10.0.0.21 -j DROP
When I do "iptables -L" I can clearly see the new rules are there.

The problem is that I can still access the server from my laptop. iptables is not blocking anything.
What am I missing?
__________________
CentOS 5.4 64bit (the Perfect Setup)
ISPConfig 2.2.40
WP3 Photography
Reply With Quote
Sponsored Links
  #2  
Old 27th January 2008, 05:18
wpwood3 wpwood3 is offline
Senior Member
 
Join Date: Oct 2007
Location: Atlanta, GA USA
Posts: 197
Thanks: 21
Thanked 31 Times in 21 Posts
 
Talking I figured it out...

You have to use -I instead of -A
Like this:
Code:
iptables -I INPUT -s 10.0.0.21 -j DROP
iptables -I OUTPUT -d 10.0.0.21 -j DROP
Using -I puts the rule at the top of the list so it gets processed first and cannot be overridden by later rules.
__________________
CentOS 5.4 64bit (the Perfect Setup)
ISPConfig 2.2.40
WP3 Photography
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Iptables gateway with one lan adapter tsmr Installation/Configuration 1 7th August 2008 12:02
Match IP with MAC using iptables for squid block cooljai Server Operation 0 30th August 2007 18:30
About iptables rules satimis Technical 0 24th August 2007 17:32
The Perfect Xen 3.0 Setup For Debian | IPTABLES rocket30 HOWTO-Related Questions 7 25th July 2006 14:18
IPtables / Bastille jlaughy Installation/Configuration 7 15th November 2005 09:44


All times are GMT +2. The time now is 09:58.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.