Port forwarding in Sheepshaver
Moderators: Cat_7, Ronald P. Regensburg, ClockWise
- MarisaG
- Tinkerer
- Posts: 46
- Joined: Wed Jul 03, 2019 8:22 am
- Location: South San Francisco, CA
- Contact:
Port forwarding in Sheepshaver
I had this working before, but in a new Sheepshaver installation I am getting warnings when starting up sheepshaver with a config line:
redir tcp:22:51.222.85.183:22
I get a warning of:
could not set up port forwarding rule 'tcp:22:22.51.222.85:22'
Any idea what's going on? I'm running as root as I need to open low ports (below 1024) so that smtp and telnet can come in...
Edit: It's definitely a low-port issue as binding to ports over 1024 works fine...
redir tcp:22:51.222.85.183:22
I get a warning of:
could not set up port forwarding rule 'tcp:22:22.51.222.85:22'
Any idea what's going on? I'm running as root as I need to open low ports (below 1024) so that smtp and telnet can come in...
Edit: It's definitely a low-port issue as binding to ports over 1024 works fine...
--- https://MacOS.Retro-OS.live - Portal for classic B&W Macs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
Re: Port forwarding in Sheepshaver
Is that SheepShaver the only application trying to use port 22? Or do you already have something running that uses that port?
Best,
Cat_7
Best,
Cat_7
- MarisaG
- Tinkerer
- Posts: 46
- Joined: Wed Jul 03, 2019 8:22 am
- Location: South San Francisco, CA
- Contact:
Re: Port forwarding in Sheepshaver
Good suggestion, but nothing is using it. Same for port 25...Cat_7 wrote: Tue Mar 24, 2026 6:11 am Is that SheepShaver the only application trying to use port 22? Or do you already have something running that uses that port?
--- https://MacOS.Retro-OS.live - Portal for classic B&W Macs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
Re: Port forwarding in Sheepshaver
How come you use redir tcp:22:51.222.85.183:22
and not redir tcp:22:10.0.2.15:22
As the redir is only useful when using slirp networking that sets the ip address to 10.0.2.15
To me it looks like you are redirecting directly to your external ip address?
I guess how this should work: redir port 22 from inside SheepShaver to e.g. port 2222 on the host. Then forward port 22 in your router to port 2222 on your host.
Best,
Cat_7
and not redir tcp:22:10.0.2.15:22
As the redir is only useful when using slirp networking that sets the ip address to 10.0.2.15
To me it looks like you are redirecting directly to your external ip address?
I guess how this should work: redir port 22 from inside SheepShaver to e.g. port 2222 on the host. Then forward port 22 in your router to port 2222 on your host.
Best,
Cat_7
- MarisaG
- Tinkerer
- Posts: 46
- Joined: Wed Jul 03, 2019 8:22 am
- Location: South San Francisco, CA
- Contact:
Re: Port forwarding in Sheepshaver
I'm trying to redirect incoming connections on port 22 on ip 51.222.85.183 to sheepshaver also on port 22... It definately is a low port issue as binding to say 5100 doesn't cause a error...Cat_7 wrote: Tue Mar 24, 2026 11:50 am How come you use redir tcp:22:51.222.85.183:22
and not redir tcp:22:10.0.2.15:22
--- https://MacOS.Retro-OS.live - Portal for classic B&W Macs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
Re: Port forwarding in Sheepshaver
What's your host system? modern macOS, for example, won't let userland processes open low ports. So you can run SheepShaver with sudo, or you can pick a higher port.MarisaG wrote: Tue Mar 24, 2026 12:37 pmI'm trying to redirect incoming connections on port 22 on ip 51.222.85.183 to sheepshaver also on port 22... It definately is a low port issue as binding to say 5100 doesn't cause a error...Cat_7 wrote: Tue Mar 24, 2026 11:50 am How come you use redir tcp:22:51.222.85.183:22
and not redir tcp:22:10.0.2.15:22
- MarisaG
- Tinkerer
- Posts: 46
- Joined: Wed Jul 03, 2019 8:22 am
- Location: South San Francisco, CA
- Contact:
Re: Port forwarding in Sheepshaver
Host is ubuntu 24.04... And I am running it as root so os-wise it should be able to open low ports.adespoton wrote: Tue Mar 24, 2026 10:32 pm What's your host system? modern macOS, for example, won't let userland processes open low ports. So you can run SheepShaver with sudo, or you can pick a higher port.
--- https://MacOS.Retro-OS.live - Portal for classic B&W Macs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
Re: Port forwarding in Sheepshaver
Is the IP address of the host the one you are redirecting to? Or is that the address of another machine?
Best,
Cat_7
Best,
Cat_7
- MarisaG
- Tinkerer
- Posts: 46
- Joined: Wed Jul 03, 2019 8:22 am
- Location: South San Francisco, CA
- Contact:
Re: Port forwarding in Sheepshaver
Cat_7 wrote: Wed Mar 25, 2026 5:18 am Is the IP address of the host the one you are redirecting to? Or is that the address of another machine?
It should be the local hosts IP. The same that Sheepshaver is running on. Note I can set up redirs from port 2222 on the local system into port 22 in Sheepshaver and it doesn't complain. Same with 25->2525.
--- https://MacOS.Retro-OS.live - Portal for classic B&W Macs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
Re: Port forwarding in Sheepshaver
Lets recap:
You say you could redirect to the same port number to the host IP address when the port was below 1024 and when running as root.
I feel I should ask again: Are you absolutely sure that used to work?
The working examples you mention all use different ports for origin and destination of traffic.
It looks to me to be a circular definition. You cannot open e.g. port 22 on the host twice. Also, when using slirp networking, the manual says you should enter the ip address 10.0.2.15 in the redirection line (this is where the traffic comes from/goes to) not the ip address of your host.
(earlier on you edited your message: "Edit: It's definitely a low-port issue as binding to ports over 1024 works fine...")
Was this when you redirected to a different port?
edit: a redir line like this: redir tcp:22:192.168.0.15:22 (where the ip address is from my host) does not choke my sheepshaver appimage when I run as root.
So something else might be wrong but I have no idea yet (I haven´t tested whether traffic is actually redirected).
Best,
Cat_7
You say you could redirect to the same port number to the host IP address when the port was below 1024 and when running as root.
I feel I should ask again: Are you absolutely sure that used to work?
The working examples you mention all use different ports for origin and destination of traffic.
It looks to me to be a circular definition. You cannot open e.g. port 22 on the host twice. Also, when using slirp networking, the manual says you should enter the ip address 10.0.2.15 in the redirection line (this is where the traffic comes from/goes to) not the ip address of your host.
(earlier on you edited your message: "Edit: It's definitely a low-port issue as binding to ports over 1024 works fine...")
Was this when you redirected to a different port?
edit: a redir line like this: redir tcp:22:192.168.0.15:22 (where the ip address is from my host) does not choke my sheepshaver appimage when I run as root.
So something else might be wrong but I have no idea yet (I haven´t tested whether traffic is actually redirected).
Best,
Cat_7
- MarisaG
- Tinkerer
- Posts: 46
- Joined: Wed Jul 03, 2019 8:22 am
- Location: South San Francisco, CA
- Contact:
Re: Port forwarding in Sheepshaver
Ok I found 2 issues: first was the host name as you mentioned. The other was that I was using port 22 (which is ssh) and not 23 (which is telnet). Changing it to 23 and now connections are being accepted! That's why there was a error trying to bind to that port...
Thanks for your patience!
Thanks for your patience!
--- https://MacOS.Retro-OS.live - Portal for classic B&W Macs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs
--- https://macos.retro-os.live/index.php/firstclass/first-class-server-access - Info on accessing our FirstClass server
--- https://NewtonCity.org - Portal for the Apple Newton PDAs