Last active
March 11, 2025 04:30
-
-
Save mainframed/2300903d9cc259a2a2ab431ca152dffc to your computer and use it in GitHub Desktop.
This script lets you connect Windows 3.11 to the internet with PPP and Trumpet WinSock in DOSBox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Heavily Modified from: https://www.dosbox.com/wiki/PPP_configuration_on_linux_host | |
# | |
# Usage: | |
# sudo ./isp.sh | |
# | |
# This script makes it so you can browse the net with DOSBox and Trumpet Winsock in | |
# Windows 3.11 | |
# | |
# LINUX: | |
# To use this script simply change the IP addresses below to two unused IP addresses on your network | |
# then run with root (needed for port 23/proxyarp) | |
# | |
# WINDOWS 3.11: | |
# Install Trumpet Winsock | |
# Click on 'Dialer->Manual Login' | |
# Type: AT (if you see 'ERROR' type AT again) | |
# ATDT <LINUX IP ADDRESS> | |
# e.g. ATDT 10.10.10.10 | |
# You should see 'CONNECT' | |
# Hit the Escape button and your good to go! | |
# | |
# DOSBox Config: | |
# Add this to the bottom of your config | |
# [serial] | |
# serial1=modem listenport:2323 | |
# serial2=dummy | |
# serial3=disabled | |
# serial4=disabled | |
# | |
grep -q 1 /proc/sys/net/ipv4/ip_forward || \ | |
( echo 1 1>/proc/sys/net/ipv4/ip_forward ) | |
# trap ctrl-c and call ctrl_c() | |
trap ctrl_c INT | |
function ctrl_c() { | |
echo "** Trapped CTRL-C" | |
echo "** Shutting down ISP" | |
echo "** Goodbye 1995" | |
pkill -9 pppd | |
[ -e "$Serial" ] && rm "$Serial" | |
exit 0 | |
} | |
echo "SoF Presents:" | |
echo " 1995 ISP Simulator" | |
echo "Starting Simulator:" | |
echo " ____ _______ _____ _______ ------- | |
/ __ \ |__ __| / _ \ |__ __| -====------ | |
| (__) | | | \ \ \_\ | | -======------ | |
| __ | | | / \ __ | | --====------- | |
| | | | | | | (\ / / | | ----------- | |
|_| |_| |_| \_____/ |_| -------" | |
echo "** Creating fake ISP" | |
echo "** Using Serial /tmp/trumpet" | |
while true | |
do | |
if sleep 0.1 && pgrep socat > /dev/null 2>&1 | |
then | |
sleep 0.1 | |
else | |
echo "** Starting socat listener on port 23" | |
socat TCP4-LISTEN:23 PTY,link="/tmp/trumpet" & | |
fi | |
sleep 0.5 | |
if pgrep pppd > /dev/null 2>&1 | |
then | |
sleep 1 | |
else | |
pppd "/tmp/trumpet" defaultroute mtu 576 10.10.0.200:10.10.0.201 login proxyarp > /dev/null 2>&1 | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I could convert this script for macOS High Sierra? I am trying to adapt this for use with DosBox/WfWG 3.11/TrumpetWinsock, no luck so far.