Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)?

share|improve this question

1 Answer 1

up vote 6 down vote accepted

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.

share|improve this answer
    
Thank you. It works! –  Andreas Sep 10 '11 at 8:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.