LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 06-18-2015, 07:15 AM   #1
secrets88
LQ Newbie
 
Registered: Jun 2015
Posts: 17
Blog Entries: 1

Rep: Reputation: Disabled
authorize any for IP


Hello,

I would like to allow all that is possible to allow for accurate machine with a known IP.

#iptables -A INPUT -s xx.yyy.zzz.aa -j ACCEPT
#iptables -A OUTPUT -s xx.yyy.zzz.aa -j ACCEPT


... But I feel like it's not. Obviously I'm not sure of anything. Can you confirm / deny whether the commands above are likely to do what I believe they do, and how else should I do?

Thank you.
 
Old 06-18-2015, 08:16 AM   #2
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 99
Two things I would change... -A appends the rules to the end of the list, meaning a previous rule could drop the traffic before it is "allowed" by your rule. -I inserts the rule to the top of the list making it the first rule processed (be careful not to "INSERT" rules later that could drop the traffic again).

Also, add the -p tcp to define the type of traffic you are looking for.

Code:
#iptables -I INPUT -p tcp -s aa.yyy.zzz.aa -j ACCEPT
#iptables -I OUTPUT -p tcp -s xx.yyy.zzz.aa -j ACCEPT
One last thought, since there is not much information detailing the setup and location of aa.yyy.zzz.aa in relation to your network, and I'm not sure the direction the traffic is flowing here, but one of these might need the -s changed to a -d for destination (probably the OUTPUT statement by my logic).
 
  


Reply



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
$HOME/.dmrc ignored, and gdm unable to authorize eschrock Mandriva 1 06-21-2011 04:48 AM
[SOLVED] Sendmail: will not authorize any users for outgoing mail elodis Linux - Software 2 11-19-2010 04:43 PM
how do you authorize of installation of flash on ubuntu aturner Linux - Software 1 09-15-2009 05:43 PM
radius server authorize problem jjsan Linux - Server 0 07-23-2008 04:02 AM
Help: I can't search 'authorize section' in radiusd.conf Paris Heng Linux - Server 0 01-30-2008 03:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 10:36 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
Open Source Consulting | Domain Registration