3

I tried to use NetworkManager to connect to my university's VPN, but it didn't work. Then I used a command line vpnc:

> sudo vpnc
[sudo] password for kirill: 
Enter IPSec gateway address: vpn.net.**.edu
Enter IPSec ID for vpn.net.**.edu: **
Enter IPSec secret for **@vpn.net.**.edu: 
Enter username for vpn.net.**.edu: **
Enter password for **@vpn.net.**.edu: 
vpnc: Error binding to source port. Try '--local-port 0'
Failed to bind to 0.0.0.0:500: Address already in use

Then I did

sudo vpnc --local-port 0

with the same configuration, and it all worked.

I'd like to be able to use the NetworkManager GUI to connect to VPN. I wanted to find out which program uses port 500:

> sudo netstat -a |grep 500
tcp        0      0 *:17500                 *:*                     LISTEN     
udp        0      0 *:4500                  *:*                                
udp        0      0 *:17500                 *:*                                
unix  3      [ ]         STREAM     CONNECTED     63500    
unix  3      [ ]         STREAM     CONNECTED     12500    @/tmp/.X11-unix/X0

There is nothing that uses 50.

I'm using Ubuntu 10.10 on a ThinkPad X201.

kirill_igum
  • 1,338

2 Answers2

1

UDP port 500 is used by ISAKMP, the IPsec key exchange protocol.

If netstat does not list the port as in use, try vpnc again after waiting a minute or so.

grawity
  • 501,077
0

This just happened to me;

in my case reason was another vpn client installed (Shrew Soft Ike) and auto-starting at start-up.

Try to catch if some other vpn client is running (in my case, ps -e | grep ike), kill it and configure it to start only when required.