Solved

ipchains and remote port

Posted on 2001-07-17
8
275 Views
Last Modified: 2010-03-18
Hi,

I have set up ipmasqadm and want to use ipchains to
protect an application with uses port xxxx to be used
remote by everyone BUT I also want a couple of people with specific IP adresses to USE it REMOTE.

What do I have to use with /sbin/ipchains ....... ?

Jeffeny
0
Comment
Question by:harryv
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
  • 2
8 Comments
 
LVL 5

Expert Comment

by:vsamtani
ID: 6289423
I'm not precisely sure what you're trying to do, but the options you probably need to specify in ipchains are:

--source-port <portnumber>
--destination-port <portnumber>
--source <ipaddress>/<mask>
--destination <ipaddress>/<mask>

If you could specify the situation you're in, perhaps with an example, it would help.

Vijay
0
 

Author Comment

by:harryv
ID: 6289479
On one of my servers I run "nessusd". A few people must be able to use the daemon remote but it is to dangerous to run
nessusd on for expample port 2222 with can be accessed by everone.

Jeffeny
0
 
LVL 5

Expert Comment

by:vsamtani
ID: 6289623
Do you mean that you need to allow some clients to access the daemon which is running on your server from a remote location?

Vijay
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 

Author Comment

by:harryv
ID: 6289746
Yep
0
 
LVL 5

Accepted Solution

by:
vsamtani earned 50 total points
ID: 6293826
Let's assume your server is on ip address pp.qq.rr.ss. If your daemon is running on port 2222, and you only want some people on specific ip addresses to access it, eg ip addresses aa.bb.cc.dd and ee.ff.gg.hh,

/sbin/ipchains -A input -d pp.qq.rr.ss/32 2222 -s aa.bb.cc.dd/32 -j ACCEPT
/sbin/ipchains -A input -d pp.qq.rr.ss/32 2222 -s ee.ff.gg.hh/32 -j ACCEPT
/sbin/ipchains -A input -d pp.qq.rr.ss/32 2222 -j DENY

The first two lines specify that if an incoming packet has a destination address of your server, on port 2222, and is from ip address aa.bb.cc.dd, then accept the packet. The next line similarly accepts a packet from ee.ff.gg.hh. The third line denies all incoming packets to your server on port 2222 that have not satisfied any of the preceding rules. So the total effect is that the specified remote ip addresses can send packets to your port 2222, but nothing else can.


Vijay
0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6297061
harryv - if you want to authenticate the users of the services, then you might try making your remote clients use ssh tunnels, VPN, etc.

Otherwise, I'd say Vijay's comments should work just fine.

-Jon

0
 
LVL 16

Expert Comment

by:The--Captain
ID: 6297219
Harryv - I guess you didn't need secure access

(a tip o' the hat to Vijay for his excellent answer).

-Jon

0
 
LVL 5

Expert Comment

by:vsamtani
ID: 6297590
Jon - thank you. High praise. I am posting a question for you to collect points for your assistance on the routing / bridging and ADSL question about two weeks ago...please look out for it at

http://www.experts-exchange.com/jsp/qShow.jsp?qid=20153402

Vijay
0

Featured Post

CHALLENGE LAB: Troubleshooting Connectivity Issues

Goal: Fix the connectivity issue in the lab's AWS environment so that you can SSH into the provided EC2 instance.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question