You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a scenario where we need our https/websocket server to listen to selected IP addresses on the host. The reason behind this is to allow internal connections from 127.0.0.1 and say 192.168.1.2, but not listen on another interface on a subnet that has a NAT gateway/firewall to the Internet. Obviously if we set the hostname to 0.0.0.0 it will listen on all available interfaces, but we'd like to remove the listener from the network connection that has a route to the world for security purposes.
We could of course set up two servers, one listening to 127.0.0.1 and the other to the local 192.168.1.2 network, but obviously that's somewhat cumbersome. We could also route everything through the local network interface and listen only there, but that forces connections from on the same server to go out to the network rather than 127.0.0.1.
I remember way back that Apache supports multiple Listen directives to allow this selection, just wondering if there's any way with the current Bun.serve to do this?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
We have a scenario where we need our https/websocket server to listen to selected IP addresses on the host. The reason behind this is to allow internal connections from 127.0.0.1 and say 192.168.1.2, but not listen on another interface on a subnet that has a NAT gateway/firewall to the Internet. Obviously if we set the hostname to 0.0.0.0 it will listen on all available interfaces, but we'd like to remove the listener from the network connection that has a route to the world for security purposes.
We could of course set up two servers, one listening to 127.0.0.1 and the other to the local 192.168.1.2 network, but obviously that's somewhat cumbersome. We could also route everything through the local network interface and listen only there, but that forces connections from on the same server to go out to the network rather than 127.0.0.1.
I remember way back that Apache supports multiple Listen directives to allow this selection, just wondering if there's any way with the current Bun.serve to do this?
Beta Was this translation helpful? Give feedback.
All reactions