port forwards should listen on localhost only

Discussions related to using VirtualBox on Linux hosts.
Post Reply
bollin
Posts: 2
Joined: 24. Sep 2008, 16:47

port forwards should listen on localhost only

Post by bollin »

Hi,

my port forwarding listens on all (*) interfaces. Is it possible to limit it to localhost only?

Cheers,
Torsten
frank
Oracle Corporation
Posts: 3362
Joined: 7. Jun 2007, 09:11
Primary OS: Debian Sid
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows
Location: Dresden, Germany
Contact:

Post by frank »

I fear this is not possible. The current NAT implementation is a complete user-space implementation which uses sockets to emulate TCP/IP connections.
bollin
Posts: 2
Joined: 24. Sep 2008, 16:47

Post by bollin »

Frank Mehnert wrote:I fear this is not possible. The current NAT implementation is a complete user-space implementation which uses sockets to emulate TCP/IP connections.
Yes, I see that src/VBox/Devices/Network/slirp/socket.c has a line

addr.sin_addr.s_addr = INADDR_ANY;

in function solisten() and that seems to be the problem.


Cheers,
Torsten
Post Reply