Using the tunnel as a gateway

Stuart Henderson stu at
Wed Sep 5 08:55:47 EDT 2012

On 2012/09/05 14:00, Alex wrote:
> Hello,
> So at school we have to use Cisco AnyConnect VPN software to access
> the internet. I used OpenConnect instead and it worked perfectly. The
> only thing left was using the computer with the VPN connection as a
> gateway for other computers on my network.
> What I did was create an ad-hoc network and used the computer with the
> VPN connection to NAT all connections. So only one computer is aware
> of OpenConnect. All the others computers see a plain old wifi
> connection. The computer with the VPN connection has two physical
> devies: eth1 and wlan0. wlan0 connects to the network and then
> OpenConnection creates the tunnel tun0. eth1 connects to the home
> ad-hoc network.
> It sort of works, but is very, very screwy. Everything works well on
> the the computer with the VPN connection.
> On the computers that are connected to the Wifi network, Skype works.
> Browsing works on SOME websites. Google works. But some websites
> don't. I thought it might be the DNS but I ran a dig and it's
> resolving IPs without any problems. IMAP works.
> Really lost on this one. Thanks for your help.

This is probably an MTU related issue. You could try reducing the
MTU on other computers, or depending on the OS you're using, there
is probably a way of adjusting the MTU on routed packets.

More information about the openconnect-devel mailing list