Ask Your Question
0

Cisco VPN (vpnc) MTU size

asked 2012-05-28 14:14:28 -0500

afeher gravatar image

updated 2014-09-29 16:14:11 -0500

mether gravatar image

How can I set the default value of vpnc MTU size? (For Starting with clik on GNOME Network icons) Fedora 17

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-05-28 15:13:52 -0500

misc gravatar image

You cannot directly do it from the graphical interface. However, you can surely add a script in /etc/NetworkManager/dispatcher.d/ to set the mtu directly on the interface on connexion.

Something like :

#!/bin/bash
if [ "$DEVICE_IFACE" = "tun0" ] ; then
   ifconfig tun0 mtu XXXX
fi;

Save it in the folder /etc/NetworkManager/dispatcher.d/, set it executable for everybody, and test. However, I do not have a vpnc setup to test, so I cannot give you more information. I am not sure that the interface name is tun0, nor that this would have side effect, but I hope this would be sufficient.

edit flag offensive delete link more
0

answered 2012-11-11 14:46:46 -0500

alon gravatar image

updated 2012-11-11 14:47:22 -0500

This worked for me when I had to switch based on the connection (specific vpn) and not just on the interface. Replace YourConnectionName with the name of your connection from /etc/NetworkManager/system-connections (the id field in the file, not the filename).

#!/bin/bash

# if this is not the vpn connection, exit without error
if [ "x$CONNECTION_ID" != xYourConnectionName ]; then
    exit 0
fi

# if the interface is down (connection is being torn down) exit without error
/sbin/ip a s $VPN_IP_IFACE || exit 0

# set mtu to low enough value to pass through vpn
/sbin/ifconfig $VPN_IP_IFACE mtu 1300
edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-05-28 14:14:28 -0500

Seen: 3,133 times

Last updated: Nov 11 '12