|
Other BSD and UNIX/UNIX-like Any other flavour of BSD or UNIX that does not have a section of its own. |
|
Thread Tools | Display Modes |
|
||||
short:
# ssh -D 4567 -l user 10.0.0.105 long: From gateway machine run that command to the box that you want to be visible outside at 4567 port. After that if you will ssh to gateway:4567 you will be really connecting to 10.0.0.105:22.
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
||||
Quote:
Code:
$ ssh gateway:2205 ssh: gateway:2205: Name or service not known |
|
||||
use that syntax:
Code:
$ ssh gateway -p 2205
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
||||
Wow, I'm totally not with it today. Ok, so now I'm getting a "Connection refused" error. I have a feeling that the firewall is blocking port 2205. I spent some time fiddling with the Mac OS X Server firewall but had no luck. Any ideas?
Also, will this solution be persistent? |
|
||||
If you want to make this permanent and you are alread using a firewall then it would be better to just user firewall for that port forwarding.
__________________
religions, worst damnation of mankind "If 386BSD had been available when I started on Linux, Linux would probably never had happened." Linus Torvalds Linux is not UNIX! Face it! It is not an insult. It is fact: GNU is a recursive acronym for “GNU's Not UNIX”. vermaden's: links resources deviantart spreadbsd |
|
||||
$ ssh user@gateway -p 2205 -L 8080:10.0.0.61:80 That will open port 8080 on your local machine, and forward any packets that hit it to port 80 on machine 10.0.0.61 on the remote network. (My man page specifies a capital L). Specify localhost (127.0.0.1) if you want the remote server itself to receive the packets. -R does the same thing in reverse: Opens the port on the remote end and forwards packets back to your network.
__________________
The only dumb question is a question not asked. The only dumb answer is an answer not given. |
|
||||
Finally found a solution, Apple doesn't make this easy...
In order to do this you'll need to edit the natd.plist file on your Mac OS X Server machine. It is located at: Code:
/etc/nat/natd.plist Code:
<key>redirect_port</key> <array> <dict> <key>aliasIP</key> <string>INCOMING IP</string> <key>aliasPortRange</key> <string>INCOMING PORT</string> <key>proto</key> <string>tcp</string> <key>targetIP</key> <string>OUTGOING IP</string> <key>targetPortRange</key> <string>OUTGOING PORT</string> </dict> <dict> <key>aliasIP</key> <string>INCOMING IP</string> <key>aliasPortRange</key> <string>INCOMING PORT</string> <key>proto</key> <string>tcp</string> <key>targetIP</key> <string>OUTGOING IP</string> <key>targetPortRange</key> <string>OUTGOING PORT</string> </dict> </array> Add as many dict blocks as you need to accommodate your redirect rules. After you have made the necessary changes simply restart NAT and voila, you're done! Additional info: Apple CyBeRHQ.nl |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
PF + SNORT on one machine | WeakSauceIII | OpenBSD Security | 5 | 30th July 2009 09:02 AM |
Networking on virtual machine | satimis | General software and network | 4 | 29th November 2008 02:16 PM |
USB support in virtual machine? | Sunnz | OpenBSD Packages and Ports | 2 | 16th November 2008 04:00 AM |
highly secure virtual machine | uptonm | OpenBSD Security | 26 | 28th July 2008 10:10 PM |
Extract ISO under OpenVZ virtual machine | stukov | Other BSD and UNIX/UNIX-like | 1 | 14th May 2008 09:46 PM |