- Enable Local Printing While VPN Is Up - Cisco Community
- Did You Try Disabling The Client's Built In Firewall(not The One Of The OS)? That Frequently Gets In The Way.
- AnyConnect VPN Client Troubleshooting Guide - Cisco
- Cisco AnyConnect Secure Mobility Client Administrator Guide ...
This configuration allows Cisco VPN Clients or the Cisco AnyConnect Secure Mobility Client secure access to corporate resources via IPsec, Secure Sockets Layer (SSL), or Internet Key Exchange Version 2 (IKEv2) and still gives the client the ability to carry out activities such as printing where the client is located. Last updated on May 30th, 2014If you use a VPN connection to securely access a workplace (e.g. Your corporate network), then all network data are transferred through the VPN connection to the remote network. In simple words, the remote VPN server’s network card becomes a new route that connects your computer to the remote network and. I have an issue with the Cisco anyconnect. Once clients are connnected they can't access anything, including their default gateway. VPN client pool is in the same subnet than local network (139.16.1.x/24). Local network clients can access to DMZ, VPN clients can ping local network computers but they can't access to DMZ. I currently have it set so while the VPN is up, clients access the Internet through our Firewall. But they are unable to print locally. What do I need to do to get them to access local printers, but still visit the Internet through.
Open the AnyConnect Client, and where you see the Network written, right click on it. Click on “Connect only to current Network”. Cisco AnyConnect Client; Solution 5: Try an Alternate Connection. At times, the internet connection that you are using might have some restrictions or might not be working properly which is causing the issue.
Last updated on May 30th, 2014
If you use a VPN connection to securely access a workplace (e.g. your corporate network), then all network data are transferred through the VPN connection to the remote network. In simple words, the remote VPN server’s network card becomes a new route that connects your computer to the remote network and – at the same time – the VPN server becomes (by default) your new gateway to access the Internet through the remote workplace’s Internet connection.
This means that if the VPN server is set up to allow Internet connectivity (by assigning a default gateway to your computer), then you can also access the Internet via the remote network's Internet connection, otherwise if the VPN server isn’t set up to allow Internet connectivity, then you can not access Internet at all. In the first case, the Internet speed is slowed down due to line speed limits and also because all network packets are re-routed through the VPN’s server network card and in the second case, the Internet connection is impossible.
To bypass these problems and use your local Internet connection to access Internet while connected to VPN, follow the steps below:
How to use your local Internet connection while connected in VPN.
Step 1. Change VPN connection properties.
1. To do this, go to:
- Windows 7 & Vista: Start > Control Panel.
- Windows XP: Start > Settings > Control Panel
- Windows 8 & 8.1:

- Press “Windows” + “R” keys to load the Run dialog box.
- Type “control panel” and press Enter.
2. Click to open “Network and Sharing Center”:
3. In the left pane, click “Change adapter settings”.
4. Right-click at your VPN connection and click “Properties”.
5. At VPN properties, click the “Networking” tab.

6. At Networking tab, highlight the “Internet Protocol Version 4 (TCP/IPv4)” item & click “Properties”.
7. Click “Advanced”.
8. Uncheck the “Use default gateway on remote network” option and press “OK”.
9. Press “OK” until you close all windows and you ‘re done!
We're hiring
We're looking for part-time or full-time technical writers to join our team! It's about a remote position that qualified tech writers from anywhere in the world can apply. Click here for more details.
Full household PC Protection - Protect up to 3 PCs with NEW Malwarebytes Anti-Malware Premium!
Some VPNs allow split tunneling, however, Cisco AnyConnect and many other solutions offer a way for network administrators to forbid this. When that happens, connecting to the VPN seals off the client from the rest of the LAN. As it turns out, breaking this seal is not that hard, which can be useful for special cases like performing pentests over a VPN designed for average users.
In our case, we had to use a hardware token that only had drivers for Windows and Mac, while most of our tools run best (and are already installed) on Linux. We started investigating on both supported platforms mentioned above and found
what others have already discovered: the routing table is modified (and kept in this state), while packets are further filtered, probably using kernel hooks.
Enable Local Printing While VPN Is Up - Cisco Community
Both IPv4 and IPv6 are affected by this filtering, and traffic towards additional network interfaces also got redirected. So we embarked on a quest to find what could be done within the rules imposed by the VPN vendor. Our first stop was the gateway in our LAN towards the internet – and thus towards the VPN concentrator. The VPN client explicitly installed routes to keep that reachable, however, packets sent directly towards the LAN gateway never arrived there, leading us towards the idea of further kernel-based filters.
Did You Try Disabling The Client's Built In Firewall(not The One Of The OS)? That Frequently Gets In The Way.
The next idea was the VPN server itself since it had to be able to receive packets from the clients as part of normal operation. However, the question is: how can you tell the packets apart on the gateway – as you still have to forward packets that are part of the normal VPN operator towards the VPN server. The trivial way was TCP port numbers, so we tried connecting to various TCP ports on the VPN server, but the gateway saw no SYN packets.
This left us with a single opportunity: keeping even the TCP port the same as the port used by the tunnel already. As netstat
has shown, a TCP connection towards port 443 was kept open throughout the VPN session, and subsequent connections were allowed by the
filtering mentioned above – we could even see these SYN packets on the gateway. The only problem was to tell TCP streams apart at the gateway so that the VPN still worked while we could initiate connections outside of it at the same time.
And then it clicked: while trying to cope with the fact that many public (or semi-public) Wi-Fi networks filter everything besides TCP/443 (HTTPS), we had SSLH deployed to multiplex HTTPS and SSH on the same TCP port. This works reliably because they are really easy to tell apart upon the first packet:
- SSH clients send plain text one-liners that identify the protocol and client version, while
- SSL/TLS clients send binary Client Hello packets that identify the protocol version and supported ciphers.
AnyConnect VPN Client Troubleshooting Guide - Cisco
SSH fits this case since its port forwarding features makes it possible to punch as many holes as necessary, regardless of the direction (VPN to LAN vs. LAN to VPN).
On Debian and its derivative systems, SSLH can be installed simply from the package with the same name (sslh
) and configuration can be found in the file /etc/default/sslh
as a command line, as this is where SSLH takes its options from. Below is the significant line:
This just means that SSLH listens on the internal (LAN) IP address of the gateway and based on the first packet received from a client that reaches this port, it either forwards it to
Cisco AnyConnect Secure Mobility Client Administrator Guide ...
- a local SSH server (here we had the VPN client running on a Windows VM, and the Linux host had the SSH daemon running, hence the variable name
$VM_HOST_IP
) or - the original VPN server.
Changes to the options can be applied under Debian and its derivatives by running /etc/init.d/sslh restart
and the results can be tested in isolation first by connecting to TCP port 443 of the gateway, which should behave like the VPN server when using a TLS client like openssl s_client
and act as an SSH server when using OpenSSH or PuTTY.
When all this works, the last bit is to redirect traffic towards the VPN server to SSLH. One way is using NAT functionality from iptables
:
This command adds a rule to the chain called PREROUTING
within the nat
table, where packets arrive before the routing decision happens. The next part is the filter, which is important to avoid loops: we only apply the magic to packets where the network interface that the packet arrives through is the LAN interface. The rest narrows the filter further to the destination TCP port being 443 and the destination host being the VPN server. The last part is what happens when this rule matches: we invoke the REDIRECT
target that rewrites
- the destination host to the IP address of the interface the packet arrived through (here: LAN interface) and
- the destination port to the one supplied (here: 443).
Since SSLH was configured to listen on TCP port 443 on the LAN interface, this results in the same effect as in the above SSLH testing scenario, where we connected directly to TCP port 443 on the gateway. And the best part is that the NAT solution provided by iptables
is fully bidirectional, reply packets from SSLH are automatically translated back to make it seems as if they were sent by the VPN server.
So with the iptables
rule in place, everything is ready for a real-life test. The progress of SSLH can be followed in syslog
and as it can be seen below, after the AnyConnect client has connected properly, SSH connections can also get through, and everything gets routed to its proper destination.
