LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 07-17-2007, 02:21 PM   #1
abefroman
Senior Member
 
Registered: Feb 2004
Location: lost+found
Distribution: CentOS
Posts: 1,430

Rep: Reputation: 55
How can I allow only ips I specify to connect on port 6433 with IPtables?


How can I allow only ips I specify to connect to a certain port?

Such as if I have a service running on port 6433.

All other traffic should be allowed.
 
Old 07-17-2007, 03:44 PM   #2
lurko
Member
 
Registered: Jun 2006
Location: Ontario, Canada
Distribution: Debian
Posts: 448

Rep: Reputation: 35
I'm definitely no networking expert, but I believe /etc/hosts.allow fulfills this function. I don't know about port-specificity however - I think that would just be handled by the service itself, whatever port it's set to run on will be covered by the service's entry in hosts.allow.

You can specify IPs to allow connections from, service by service. for example, this:
Code:
sshd: 192.168.0.*
would allow any IP that matches to login with ssh.



"les jeux son fait - translation: the game is up! your ass is mine!"

lol great nick.
 
  


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
how to make iptables blacklist a user if they connect to a certain port GeorgeMoney Linux - Networking 5 04-08-2007 05:06 AM
iptables and groups of ips LinuxGeek Linux - Security 6 02-01-2007 03:26 PM
need to get iptables to have a max count of attempts to connect to a port nass Linux - Networking 2 11-09-2006 01:04 PM
iptables help! DROP ssh port, but allow to connect to ssh if from 2222 port kandzha Linux - Networking 4 09-13-2006 09:10 AM
how to define a specific range of IPs and/or multiple IPs in an iptables rule?... TheHellsMaster Linux - Security 9 09-20-2004 10:06 AM

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

All times are GMT -5. The time now is 11:39 AM.

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