Solved

ipchains and remote port

Posted on 2001-07-17
8
267 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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

747 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