Re: [SOVLED by '!' ]how to specify IP not equal to in iptables rules ????

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 16 July 2011 02:22 PM, g wrote:
> On 07/16/2011 05:40 AM, Jatin K wrote:
>> On Saturday 16 July 2011 10:18 AM, g wrote:
>>> On 07/16/2011 04:25 AM, Jatin K wrote:
>>> <>
>>>
>>>> Sorry, that was my mistake  :-(
>>> that happens. but does make things difficult to help.
>>>
>>>> actually I got the solution what was needed, from this list.
>>> and was so noted. wherein, a little more info would be nice.
>>>
>>> did blocking work with;
>>>
>>>     [1] iptables -A INPUT ! -s 172.16.158.111 -p tcp --dport 21 -j DROP
>>> or
>>>     [2] iptables -A INPUT -s ! 172.16.158.111 -p tcp --dport 21 -j DROP
>>>
>>> syntax tends to indicate that [2] is correct, as [1] would tend to
>>> indicate "NOT source".
>>
>> [2] worked for me
> this is what i recall having used, and more logical.
>
>>    ...by the way we need to indicate !  like '!' ( in
>> single quote)
>>
>> iptables -A INPUT -s '!' 172.16.158.111 -p tcp --dport 21 -j DROP
> this is not as i recall using, nor is it as such in man page or in
> 'Red Hat Linux Firewalls'.
>
> in man page, when shown as an option, [!] is used. when in description,
> "!" is used. (with 2 exceptions)
>
> in 'Red Hat Linux Firewalls', examples are show without quotes.
>
> so,
>
>   [1] did you find without single quote to not work and then tried
>   with single quotes?
>

without single quote  like this[1]
[1]  iptables -A INPUT ! -s 172.16.158.111 -p tcp --dport 21 -j DROP

on bash it seems like it tries to find out previously run command  in my 
cash it finds a command started with -s ( which fails as I've not run 
any command which starts with -s )

but when I tried to put it like '!'... its good to go




> or,
>
>   [2] are you using "echo" to send line to iptables?
  no



> and please, excuse my questioning, as at this time i do not have a
> networking system available to experiment with, and your answers will
> help when i do. thank you.
>


Warm Regards

-- 
   °v°
  /(_)\
   ^ ^  Jatin Khatri
Registerd Linux user No #501175
www.counter.li.org
No M$

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines


[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux