LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 02-09-2005, 02:20 PM   #1
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Rep: Reputation: 32
shell got confused with iptables ...


can any body tell me the solution for this?

Code:
root@DARKSTAR:~# iptables -A OUTPUT -p tcp --dport !1863 -j DROP
-bash: !1863: event not found
root@DARKSTAR:~#
 
Old 02-09-2005, 02:29 PM   #2
secesh
Senior Member
 
Registered: Sep 2004
Location: Savannah, GA
Distribution: Ubuntu, Gentoo, Mythbuntu, ClarkConnect
Posts: 1,154

Rep: Reputation: 47
Quote:
mac
--mac-source [!] address
Match source MAC address. It must be of the form
XX:XX:XX:XX:XX:XX. Note that this only makes sense
for packets coming from an Ethernet device and
entering the PREROUTING, FORWARD or INPUT chains.
--destination-ports port[,port[,port...]]
Match if the destination port is one of the given
ports. The flag --dports is a convenient alias for
this option.
can't say i'm an iptables expert, but i notice two things syntactically:
1) i included the mac quote above to illustrate that the manpage specifies a space when using !
2) the --dports option does not specify use of ! as acceptable (two-step the rule? -- allow the one port, drop all others -- is that what you're trying to do?)
 
Old 02-09-2005, 02:37 PM   #3
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Original Poster
Rep: Reputation: 32
no thats not my problem i am saying that my shell is interpresting ! as its history but i want to block all ports except 1863 how would be that possible, how can I tell me shell not to consider ! as its history command?
 
Old 02-09-2005, 02:38 PM   #4
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Original Poster
Rep: Reputation: 32
no thats not my problem i am saying that my shell is interpreting ! as its history but i want to block all ports except 1863 how would be that possible, how can I tell me shell not to consider ! as its history command?
 
Old 02-09-2005, 02:47 PM   #5
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Original Poster
Rep: Reputation: 32
no thats not my problem i am saying that my shell is interpreting ! as its history but i want to block all ports except 1863 how would be that possible, how can I tell me shell not to consider ! as its history command?
 
Old 02-09-2005, 04:18 PM   #6
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,791
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Code:
iptables -P OUTPUT DROP
iptables -A OUTPUT -p tcp --dport 1863 -j ACCEPT
 
Old 02-09-2005, 04:32 PM   #7
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Lubuntu
Posts: 19,176
Blog Entries: 4

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
Moved: This thread is more suitable in Linux-Security and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 02-12-2005, 08:02 AM   #8
ilnli
Member
 
Registered: Jul 2004
Location: Pakistan
Distribution: Slackware 10.0, SUSE 9.1, RH 7, 7.3, 8, 9, FC2
Posts: 413

Original Poster
Rep: Reputation: 32
anyone with some other suggestions
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell interface vs shell scripting? I'm confused jcchenz Linux - Software 1 10-26-2005 04:32 PM
shell got confused with iptables ... ilnli Linux - Security 1 02-09-2005 10:10 PM
IPTables: config files, scripts, saving etc...confused tarballed Linux - Security 4 12-30-2004 07:41 PM
iptables - firewalls - confused newbie mymojo Linux - Newbie 7 12-16-2003 05:50 PM
BitTorrent + iptables = a confused me GT_Onizuka Linux - Newbie 4 08-28-2003 05:50 PM


All times are GMT -5. The time now is 12:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration