dpw818
I've spent days and days trying to figure this out, and I am at a complete loss. I really hope someone can point me in the right direction!! To sum it up: I created 2 /etc/openvpn/conf files, one for UDP and one for TCP. I can connect to either the TCP or the UDP. But once I have connected, I am unable to get internet access if I disconnect and reconnect through the other. It's almost like the first connected has bound to both tun0 and tun1 interfaces, preventing the second connected from doing so. Note that I removed the firewall rules for the TCP when it wasn't working, but I basically had replicated the two 1194 references and changed them to 443s.
A few notes (also embedded in the configs as comments):
- I tried with both as tun, and then one as tun0 and one as tun1. No difference
- I tried specifying ifconfig 10.8.0.10 10.8.0.20 for one of the configs, but no change
My config and my firewall are below. I really, really appreciate any help on this. Thank you!!
# Set access for localhost - necessary for many programs
iptables -A INPUT -i lo -j ACCEPT
# Accept packets belonging to established and related connections
iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
#The below 4000 is another port I need
iptables -A INPUT -p tcp --dport 4000 -j ACCEPT
iptables -A INPUT -p udp --dport 1194 -j ACCEPT
# Allows VPN traffic to Forward
iptables -A FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A FORWARD -s 10.8.0.0/24 -j ACCEPT
iptables -t nat -A PREROUTING -p udp --dport 1194 -j DNAT --to 192.168.0.30
# Allows proper routing of VPN subnet
iptables -t nat -A POSTROUTING -s 10.8.0.0/24 -o eth0 -j MASQUERADE
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT ACCEPT
dev tun0 #have also tried just tun
proto udp #changed to TCP for tcp
port 1194 #changed to 443 for TCP
a /etc/openvpn/easy-rsa/keys/ca.crt
cert /etc/openvpn/easy-rsa/keys/my.crt
key /etc/openvpn/easy-rsa/keys/my.key
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
server 10.8.0.0 255.255.255.0
ifconfig 10.8.0.1 10.8.0.2
push "route 10.8.0.1 255.255.255.255"
push "route 10.8.0.0 255.255.255.0"
push "route 192.168.0.30 255.255.255.0"
push "dhcp-option DNS 192.168.0.1"
push "redirect-gateway def1"
keepalive 10 120
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
cipher AES-256-CBC
keysize 256
comp-lzo
user me
group me
persist-key
persist-tun
tun-mtu 1500
client-config-dir ccd
Thank you!!!!