Skip to content

Commit

Permalink
Update 11-change-ppp-mtu.sh
Browse files Browse the repository at this point in the history
Added a commented out line which should work for KPN in The Netherlands
  • Loading branch information
TotalGriffLock authored Jun 23, 2022
1 parent 5df4946 commit 43afd6a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions 11-change-ppp-mtu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ while true; do
pinterfaces=$(ls /etc/ppp/peers/)
for pinterface in $pinterfaces
do
sed -i 's/ 1492/ '$PTARGET'/g' /etc/ppp/peers/$pinterface
sed -i 's/ '$(($PTARGET-8))'/ '$PTARGET'/g' /etc/ppp/peers/$pinterface
einterface=$(grep 'plugin rp-pppoe.so' /etc/ppp/peers/$pinterface | sed 's/plugin rp-pppoe.so //')
ip link set dev $einterface mtu 1508
ip link set dev $einterface mtu $(($PTARGET+8))
# Maybe your PPPoE is over a VLAN and you need this instead
# ip link set dev $einterface mtu $(($PTARGET+12)) && ip link set dev $einterface.6 mtu $(($PTARGET+8))
ifconfig $einterface down && ifconfig $einterface up
done
killall pppd
Expand Down

0 comments on commit 43afd6a

Please sign in to comment.