PPP not routing to network
Hi
I was using UART mode PPP from the MiniMig and ao486 cores and it was working fine. I don't think I've changed anything, but they are no longer working from either.
I can connect to PPP OK, and on both cores I can ping the MiSTer's IP. I can't ping anything beyond the (router, anything else on my network, etc.).
It looks like something has gone wrong with the routing on the MiSTer side. Is there any way of checking?
An old thread suggested to add this to iptables.up.rules
Code: Select all
-A FORWARD -i ppp+ -o eth0 -j ACCEPT
I did try that and it didn't make any difference.
The only thing I can think of that I've knowingly done is added some lines to /sbin/uartmode to get faster Internet from MiniMig. I'm pretty sure that worked though as I tested it. My uartmode currently looks like this:
Code: Select all
#!/bin/bash
kill_all() {
rm -f /tmp/uartmode*
rm -f /tmp/ML_BAUD
killall midilink
killall pppd
killall agetty
killall login
killall mt32d
killall fluidsynth
killall mpg123
}
conn_speed=115200
[ -f /tmp/UART_SPEED ] && conn_speed=$(cat /tmp/UART_SPEED)
echo "ttyS1: "$conn_speed
if [ "$1" == "1" ]; then
if [ ! -f /tmp/uartmode1 ]; then
kill_all
echo "1" >/tmp/uartmode1
(
while true
do
if [ -f /media/fat/linux/ppp_options ]; then
localip=$(ifconfig 2>/dev/null | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
remoteip=$(ifconfig 2>/dev/null | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){2}[0-9]*).*/\2/p').254
if [ -z $localip ]; then
echo cannot get local IP for PPP link.
localip=0.0.0.0
remoteip=0.0.0.0
else
echo "PPP link: $localip->$remoteip"
fi
echo "$localip:$remoteip" >/tmp/ppp_options
cat /media/fat/linux/ppp_options >>/tmp/ppp_options
echo 1 > /proc/sys/net/ipv4/ip_forward
[ -f /tmp/CORENAME ] && core_name=$(cat /tmp/CORENAME)
if [ "$core_name" == "Minimig" ]; then
taskset 1 pppd 230400 file /tmp/ppp_options
else
taskset 1 pppd $conn_speed file /tmp/ppp_options
fi
# taskset 1 pppd $conn_speed file /tmp/ppp_options
else
echo "skip pppd"
exit 0
fi
[ ! -f /tmp/uartmode1 ] && exit 0
echo respawn pppd
sleep 1
done
) &
fi
elif [ "$1" == "2" ]; then
if [ ! -f /tmp/uartmode2 ]; then
kill_all
echo "1" >/tmp/uartmode2
(
while true
do
taskset 1 agetty $conn_speed ttyS1 -h &
wait $!
[ ! -f /tmp/uartmode2 ] && exit 0
echo respawn console
sleep 1
done
) &
fi
elif [ "$1" == "3" ]; then
if [ ! -f /tmp/uartmode3 ]; then
kill_all
echo "1" >/tmp/uartmode3
(
while true
do
taskset 1 midilink MENU QUIET &
wait $!
[ ! -f /tmp/uartmode3 ] && exit 0
echo respawn midilink
sleep 1
done
) &
fi
elif [ "$1" == "4" ]; then
if [ ! -f /tmp/uartmode4 ]; then
kill_all
echo "1" >/tmp/uartmode4
(
while true
do
taskset 1 midilink MENU QUIET &
wait $!
[ ! -f /tmp/uartmode4 ] && exit 0
echo respawn midilink
sleep 1
done
) &
fi
elif [ "$1" == "5" ]; then
if [ ! -f /tmp/uartmode5 ]; then
kill_all
echo "1" >/tmp/uartmode5
(
while true
do
taskset 1 midilink UDP QUIET BAUD $conn_speed
wait $!
[ ! -f /tmp/uartmode5 ] && exit 0
echo respawn midilink
sleep 1
done
) &
fi
else
if [ -f /tmp/uartmode* ]; then
kill_all
fi
fi