Linux networking: bidirectional host-to-guest communication #4303
Unanswered
hadjiprocopis
asked this question in
Q&A
Replies: 2 comments
-
Thank you. I should find some time to add an example to the wiki on setting up slirp with port forwarding. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi all, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi all,
I want to share my experience on how to achieve bidirectional communication between a Linux box and a dosbox-x hosted there in.
In general, I have followed the tutorial here: https://dosbox-x.com/wiki/Guide%3ASetting-up-networking-in-DOSBox%E2%80%90X#_mtcp_example
I have used the slirp backend with this configuration with one important addition, the
tcp_port_forwards = 6666
which essentially allows me to "access" port 6666 in dosbox-x:On running the dosbox-x I do:
DHCP talks back to me and gives me:
From dosbox-x I can contact a simple diy echo server running on my linux box (hosting dosbox-x) and listening on port 3333, with
telnet.exe 10.0.2.2 3333
. So, I can confirm bidirectional communication when the server is on linux box.Then I run on the dosbox-x a simple echo server based on mTCP (which reads the same configuration as telnet.exe, i.e. with IPADDR etc.) and which listens to port 6666.
What I did not find (I think!) in the tutorial is that I can access the dosbox-x echo server from my linux box (hosting the dosbox-x) using
telnet 127.0.0.1 6666
. This is possible thanks to the line under[ethernet, slirp]
:tcp_port_forwards = 6666
. Also note also that from linux's point of view the dosbox-x is at127.0.0.1
and from dosbox-x's point of view the linux host is at10.0.2.2
Beta Was this translation helpful? Give feedback.
All reactions