beagle72
Hi,
This is a confusing question to explain but here's my best shot.
I have a VPS which runs a variety of servers for my personal use, including IMAP, HTTP, and SSH. IMAP and HTTP run on standard ports (143 and 80) while the SSH server runs on a non-standard port 43500.
The OpenVPN server itself runs on port 443 in a TCP-server/TCP-client setup. This allows me to connect through strict networks that only allow web access. I do not run any other service on 443 on this host.
This setup mostly works fine. The client has full Internet access, etc. My problem is accessing some of my services running on the VPS itself while connected via the VPN.
The VPS external IP is 97.x.x.x. Its VPN IP is 10.8.0.1. The VPN client is assigned 10.8.0.6.
When the VPN is NOT connected my client machine can connect to VPSIP:143 for IMAP.
When the VPN IS connected, my client machine CANNOT connect to VPSIP:143 but it CAN connect to 10.8.0.1:143.
More confusing: the client machine CAN connect to both VPSIP:80 and 10.8.0.1:80.
For testing purposes, I configured the SSHd to listen on both 22 and 43500. Result:
On VPN, the client machine CAN connect to VPSIP:22 but CANNOT connect to VPSIP:43500. It CAN connect to both via 10.8.0.6.
Again, all connections to these ports through VPSIP work fine when the client is not connected to the VPN. (Unless of course I'm on a restricted network that is blocking these ports.)
If this is a firewall issue, I'm stumped because it is not logging any blocked connections like it does when I attempt a legitimate blocked port. If it is configurations with the individual services (dovecot imap, sshd) then I'm also stumped because they are not restricted to listening by any IP or connection.
I don't want to have to change the IP address in e.g. Thunderbird just to check email when on and off the VPN. Would love to figure this out!
Here is the server config from openvpn:
port 443
proto tcp-server
dev tun0
ca keys/xxx/ca.crt
cert keys/xxx/serverkey.crt
key keys/xxx/serverkey.key
dh keys/xxx/dh1024.pem
server 10.8.0.0 255.255.240.0
crl-verify keys/xxx/crl.pem
ifconfig-pool-persist servers/xxx/logs/ipp.txt
cipher AES-256-CBC
user nobody
group nogroup
status servers/xxx/logs/openvpn-status.log
log-append servers/xxx/logs/openvpn.log
verb 2
mute 20
max-clients 5
keepalive 10 120
client-config-dir /etc/openvpn/servers/xxx/ccd
comp-lzo
persist-key
persist-tun
ccd-exclusive
ping-restart 0
push "redirect-gateway def1 bypass-dhcp"
push "dhcp-option DNS 8.8.8.8"