Solved

ipchains and remote port

Posted on 2001-07-17
8
274 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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

Building an interactive eFuture classroom

Watch and learn how ATEN provided a total control system solution including seamless switching matrix switch, HDBaseT extenders, PDU, lighting control to build an interactive eFuture classroom.

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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

734 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