Saturday, February 24, 2024
 Popular · Latest · Hot · Upcoming
16
rated 0 times [  16] [ 0]  / answers: 1 / hits: 9370  / 3 Years ago, thu, july 15, 2021, 6:31:57

I'm starting a VPN connection using Network Manager.
Once the connection is established I have to change MTU in order it to work properly.
For example:



sudo ifconfig ppp0 mtu 777


It is very annoying to execute this command every time I open a VPN connection. Is there any idea to create a script that would execute this command automatically once the connection is established (ppp0 interface is up)?


More From » vpn

 Answers
2

Create a script in /etc/network/if-up.d, containing



#!/bin/sh

if [ "$IFACE" = "ppp0" ]; then
ifconfig ppp0 mtu 777
fi


and make it executable.


[#43541] Friday, July 16, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
atetamme

Total Points: 11
Total Questions: 121
Total Answers: 109

Location: Puerto Rico
Member since Sun, Jun 27, 2021
3 Years ago
;