nixCraft Linux Forum

nixCraft

Linux 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

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-05-2007, 01:01 AM
raj raj is offline
Contributors
User
 
Join Date: Jun 2005
Location: Hyderabad
Posts: 146
Rep Power: 4
raj is on a distinguished road
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
Sponsored Links
Reply

Bookmarks


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 On

Similar Threads

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


All times are GMT +5.5. The time now is 11:03 PM.


Powered by vBulletin® Version 3.7.3 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

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