nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Iptables block ip address

This is a discussion on Iptables block ip address within the Getting started tutorials forums, part of the Linux Getting Started category; Let say you wanna block IP address 192.168.1.5, enter at command prompt in your shell script: Code: iptables -A INPUT ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Getting started tutorials

Linux answers from nixCraft.


Getting started tutorials So much to read, so little time! If that is your problem, we have solution. Read our FAQ and tutorials to help you cut through the clutter of information overload. Only members of "contributors" group can post new tutorials. Other members can just reply to thread.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2007, 01:01 AM
raj's Avatar
raj raj is offline
Senior Member
User
 
Join Date: Jun 2005
Location: Hyderabad
OS: Fedora, Debian Linux
Posts: 307
Thanks: 42
Thanked 8 Times in 8 Posts
Rep Power: 6
raj will become famous soon enough raj will become famous soon enough
Default Iptables block ip address

Let say you wanna block IP address 192.168.1.5, enter at command prompt in your shell script:
Code:
iptables -A INPUT -s 192.168.1.5 -j DROP
Block outoging IP address 192.168.1.2 from server:
Code:
iptables -A OUTPUT -p tcp -d 192.168.1.2  -j DROP
See also:
Linux / UNIX - Iptables related howtos, tutorials, and tips
__________________
Raj
Linux rulz.
I have never turned back in my life ; I shall not do so today.. haha
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
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 On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
How to Block Spam Mails in Sendmail ppnair Mail Servers 3 28-08-2008 12:06 AM
How to Block Ultrasurf laluvirtual Linux software 9 15-06-2008 04:21 PM
Block ping response with Endian firewall OSCARM Linux software 4 08-01-2008 11:39 PM
How to block gtalk messenger through squid bubloob_13 Linux software 0 16-04-2007 11:59 AM
How to block sites in Squid joproz Linux software 2 18-11-2006 05:00 PM


All times are GMT +5.5. The time now is 07:02 PM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38