https://www.dosbox.com/wiki/index.php?title=Minix2_16bit_ppp_demo&feed=atom&action=history
Minix2 16bit ppp demo - Revision history
2024-03-29T14:52:27Z
Revision history for this page on the wiki
MediaWiki 1.34.1
https://www.dosbox.com/wiki/index.php?title=Minix2_16bit_ppp_demo&diff=135471&oldid=prev
Naszvadi: Minix2 networking test drive - slip setup
2017-10-18T11:27:27Z
<p>Minix2 networking test drive - slip setup</p>
<p><b>New page</b></p><div>DOSBox supports nullmodem connection using tcp sockets. In this page, we describe a simple networking slip configuration on linux (ubuntu) host, but for Minix 2.0.2 guest operating system. With socat or similar tools on host's side, you can connect these sockets with slattach, and the DOSBox guest can access internet as well.<br />
<br />
== WARNING! ==<br />
<br />
The included script and manual is dangerous. It needs sudo or root access to the target host, uses external dependencies, can cause damage and irrecoverable package dependency problems via apt installing, and may be harmful when you are not familiar with tcp/ip ipv4 networking or linux iptables/slattach/etc. tools.<br />
<br />
== Prerequisities under ubuntu ==<br />
<br />
=== Internet settings ===<br />
<br />
A working internet connection is essential.<br />
10.1.1.0/24 network must be unused! Otherwise network range collision will happen, causing unpredictable results!<br />
<br />
=== Required ubuntu packages ===<br />
<br />
The followings need to be installed:<br />
apt-get install bash dosbox iptables socat sudo<br />
<br />
=== The main script: minixbox.sh ===<br />
<br />
The content of minixbox.sh:<br />
#! /bin/bash<br />
flushipt() {<br />
for i in $( iptables -t nat -n --line-numbers -L \<br />
| awk '/^Chain POSTROUTING/,/^$/{if(/^[0-9].*[^0-9]10\.1\.1\./)print $1}' | tac )<br />
do<br />
iptables -t nat -D POSTROUTING "$i"<br />
done<br />
for i in $( iptables -t nat -n --line-numbers -L \<br />
| awk '/^Chain PREROUTING/,/^$/{if(/^[0-9].*[^0-9]10\.1\.1\./)print $1}' | tac )<br />
do<br />
iptables -t nat -D PREROUTING "$i"<br />
done<br />
if id -u | grep -q '^0'; then<br />
:<br />
else<br />
echo 'dosbox slip deployment for minix2 guest'<br />
echo 'Author(s): Naszvadi Peter et al'<br />
echo<br />
echo "Please run ''$0'' as root!"<br />
echo<br />
exit 1<br />
fi<br />
set -e<br />
echo Checking necessary applications:<br />
which dosbox<br />
which iptables<br />
which slattach<br />
which socat<br />
which sudo<br />
which tac<br />
set +e<br />
flushipt<br />
Dev_Pts="$(mktemp -u /tmp/slipXXX)"<br />
socat PTY,link="$Dev_Pts",raw,echo=0 TCP-LISTEN:8040 &<br />
Pid_Saved_3="$!"<br />
sleep 1<br />
Uid="$(find "$0" -printf '%U' -quit)"<br />
sudo -u "#$Uid" dosbox -conf mnxslip.cnf &<br />
Pid_Saved="$!"<br />
grep -q 1 /proc/sys/net/ipv4/ip_forward || ( echo 1 1>/proc/sys/net/ipv4/ip_forward )<br />
slattach -d -s 9600 -p adaptive "$Dev_Pts" 1>/dev/null 2>/dev/null &<br />
Pid_Saved_2="$!"<br />
sleep 3<br />
ifconfig sl0 10.1.1.3 dstaddr 10.1.1.1 netmask 255.255.255.0 mtu 576 up 1>/dev/null 2>/dev/null<br />
set -x<br />
iptables -t nat -A POSTROUTING -s 10.1.1.0/24 -j MASQUERADE 1>/dev/null 2>/dev/null<br />
set +x<br />
while ps "$Pid_Saved" 1>/dev/null 2>/dev/null; do sleep 5<br />
done 1>/dev/null 2>/dev/null<br />
2>&-<br />
kill -9 "$Pid_Saved_2" "$Pid_Saved_3" 1>/dev/null 2>/dev/null<br />
flushipt<br />
exit 0<br />
<br />
=== The custom configuration file: mnxslip.cnf ===<br />
<br />
The content of mnxslip.cnf:<br />
[serial]<br />
serial1=nullmodem server:localhost port:8040 transparent:1<br />
[autoexec]<br />
mount C .<br />
C:<br />
C:BOOT.COM PPP16<br />
<br />
== Launch a networked session under ubuntu ==<br />
<br />
=== Creating working directory ===<br />
<br />
Create a standalone folder, e.g. mkdir ~/minixslip<br />
<br />
=== Creating files ===<br />
<br />
Necessary files:<br />
* dosppp1615.zip<br />
* minixbox.sh<br />
* mnxslip.cnf<br />
The latters should be saved from this site.<br />
<br />
Set attributes of minixbox.sh:<br />
chmod 755 minixbox.sh<br />
Download and extract dosppp1615.zip: link and checksums at the bottom of this page<br />
<br />
Till this, the above were the once time steps.<br />
<br />
=== Launch ./minixbox.sh ===<br />
<br />
Do it with sudo:<br />
sudo ./minixbox.sh<br />
If everything is okay, you can get similar results like these - setup slip in minix2 prompt after logging in with passwordless root account:<br />
slip.drv -b 38400 -c -i 10.1.1.1 /dev/tty00 & echo nameserver 8.8.8.8 >/etc/resolv.conf<br />
Press enters after entering command till getting command prompt back.<br />
<br />
[[File:dosbox_minix2_slipsetup.gif]]<br />
<br />
== Applications ==<br />
<br />
=== Telnet ===<br />
<br />
[[File:dosbox_minix2_telnetbbs.gif]]<br />
<br />
=== IRC client ===<br />
<br />
[[File:dosbox_minix2_minirc.gif]]<br />
<br />
== Minix-specific ==<br />
<br />
Graceful shutdown of guest in guest CLI:<br />
# sync<br />
# shutdown<br />
Then type exit + ENTER at the appearing prompts!<br />
<br />
=== Links ===<br />
<br />
* http://minix1.woodhull.com/pub/demos-2.0/ppp16/dosppp1615.zip<br />
** cksum: 3791977839 1495039<br />
** md5sum: 1e6d6f3d6ecbf4a2c0593d95ea393618<br />
** sha256sum: 739f34d9ae4ce28097a840cc075cc6a336a7ad44b91d8d300b15d19f73eb5ff2</div>
Naszvadi