I have scoured the forums and internet and I cannot solve a port forwarding problem. My goal is
i) pipe everything, across all ports, from client through VPN tunnel on one port (in my case port 443)
ii) when the VPN server retrieves the requested data, it will pipe everything back across the same port where the received packets get translated into the appropriate ports back on the client side.
Everything seems to be working except the port forwarding portion.
I have successfully connected the client to the server where the client gets IP 10.8.1.x, so everything seems to be working out. When I hit whatsmyip.com with my client I am also getting the VPN server's IP, so that is working as expected.
Here is the kicker, when I use a program that uses a specific port (e.g. setting up a new imap server that requires port 143 that is blocked), I make a successful connection to the VPN server via port 443 but I still cannot make the connection to the mail server. I know if I log onto the VPN server I can access the imap server just fine. My client is also successfully connect to the VPN server on port 443. In theory the client should be able to connect to the imap server as long as the client is connected to the VPN server.
I have added some iptables rules, but I think I'm still missing something. Any help would be greatly appreciated!

Server Config
Code: Select all
port 443
proto tcp
dev tun
ca privnet/ca.crt
cert privnet/server.crt
key privnet/server.key
dh privnet/dh1024.pem
tls-auth privnet/ta.key 0
cipher AES-256-CBC
server 10.8.1.0 255.255.255.0
ifconfig-pool-persist ipp.txt
keepalive 10 120
comp-lzo
user nobody
group nobody
persist-key
persist-tun
status openvpn-status.log
verb 1
max-clients 10
push "redirect-gateway def1"
push "dhcp-option DNS 10.8.1.1"
push "dhcp-option DNS 8.8.8.8"
push "dhcp-option DNS 8.8.4.4"
Client Configiptables -t nat -A POSTROUTING -s 10.8.1.0/24 -o eth0 -j MASQUERADE
Code: Select all
client
dev tun
proto tcp
remote vpn.myserver.com 443
resolv-retry infinite
nobind
persist-key
persist-tun
ca ca.crt
cert client-nopass.crt
key client-nopass.key
ns-cert-type server
tls-auth ta.key 1
cipher AES-256-CBC
comp-lzo
verb 3