FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 07-14-2011, 02:03 PM
Tom H
 
Default how to specify IP not equal to in iptables rules ????

On Thu, Jul 14, 2011 at 8:48 AM, Jatin K <ssh.fedora@gmail.com> wrote:
>
> I want to deny a particular IP (172.16.158.111) address in my network to
> FTP on server (RHEL6), I'm trying to add the following[1][2] iptabls
> rules on server *and getting error [3]
>
> *[1] iptables -A INPUT -s! 172.16.158.111 -p tcp --dport 21 -j DROP
> *[2] iptables -A INPUT -s! 172.16.158.111 -p tcp --dport 20 -j DROP
>
> [3] *Using intrapositioned negation (`--option ! this`) is deprecated in
> favor of extrapositioned (`! --option this`).
>
> [4] iptables -A INPUT -s !172.16.158.111 -p tcp --dport 21 -j DROP

Without any "!" should do it because you'll be telling iptables to
drop connections from that IP.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
 

Thread Tools




All times are GMT. The time now is 01:24 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org