Dial On Demand with wvdial and …

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..

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.