Dial On Demand with wvdial and pppd – this works very nicely in Red Hat 8.
Add the following to /etc/rc.local and you can masquerade for your home network:
/sbin/iptables -t nat -A POSTROUTING -o ppp0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
Yes, there is a way to set IP forwarding with the sysconfig files but I don’t have the patience to look for it right now.
Not sure if that iptables command will work if ppp0 doesn’t exist (ie. when my machine boots). If it doesn’t, then put those commands in /etc/ppp/ip-up.local and it’ll probably work.)
If you get an error in /var/log/messages saying pppd can’t override the default route on eth0, just remove that route /etc/sysconfig/network by deleting the text after “GATEWAY=” in that file.
All I have to do now is start and stop pppd from crontab so I don’t get on the nerves of the people at Esat..