Solved

ipchains and remote port

Posted on 2001-07-17
8
271 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
  • 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

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…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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