Ethical Hacking Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package. | Computer Forensics Training at InfoSec Institute Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors. |

| Subject: | Re: Question about port forwarding ACL |
|---|---|
| Date: | Sun, 14 Jan 2007 21:21:19 +1100 |
Artem Dmytrenko wrote:
I apologize in advance if this question has been answered before, but unfortunately I could not find any good references online. This question is with respect to OpenSSH 4.2p1. Is it possible to configure access control for forwarded ports? For example, let's say there is a mix of services running on localhost. Some of those services are secure (e.g. check for passwords, etc) and some are not intended to be accessed from outside (maybe they allow unauthorized access to privileged resources). Is it possible to configure ssh daemon so that it can enable forwarding to some ports but not others? For example, allow port forwarding to "localhost, ports 1000-5000", prohibit access to all other ports.
In OpenSSH 4.2 you can restrict port forwards via key options in
authorized_keys, but that only works for public-key authentications.
In 4.4 and newer, you can use the new "Match" and "PermitOpen"
directives in sshd_config to do the same thing regardless of the
authentication type (but see bug #1267 if you want to specify multiple
destinations). It doesn't do ranges, though.
If your platform supports it, another possible option is to use a local
packet filter that matches the user (eg Linux's iptables --uid-owner or
pf "user" rules on OpenBSD). This will only work if you have privilege
separation enabled so the sshd doing the forwarding is running with the
UID of the logged-in user.
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | DenyUsers option on OpenS, Loris Serena |
|---|---|
| Next by Date: | TCP_NODELAY, Chris Nystrom |
| Previous by Thread: | Question about port forwarding ACL, Artem Dmytrenko |
| Next by Thread: | Re: Question about port forwarding ACL, Thomas Hafner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |