Solved

ipchains and remote port

Posted on 2001-07-17
8
268 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
 

Author Comment

by:harryv
ID: 6289746
Yep
0
Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

 
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

New My Cloud Pro Series - organize everything!

With space to keep virtually everything, the My Cloud Pro Series offers your team the network storage to edit, save and share production files from anywhere with an internet connection. Compatible with both Mac and PC, you're able to protect your content regardless of OS.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Postfix DNS lookups setup 5 41
deny acl with basic authentication user on squid 7 74
Help with Ubuntu 14.04 LTS 10 132
Setting up two Raspberry Pi gateways/routers 3 40
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…
Internet Business Fax to Email Made Easy - With  eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, f…
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now