VPN Connection problem

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
n3lThon
OpenVpn Newbie
Posts: 4
Joined: Thu Nov 03, 2011 6:24 pm

VPN Connection problem

Post by n3lThon » Thu Nov 03, 2011 6:39 pm

Hi,

I'm creating a VPN, and I have a problem with the connection. Everything looks good but when i'm playing games the connection goes down.

I have configurated all rules for iptables. My network:

ISP Router -> Server -> Local Network

The server has 2 interfaces and its working like a router, so when I'm at the local network everything work perfectly, but trough the vpn I lost the connection only at the game, but everything continuous working.

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: VPN Connection problem

Post by Mimiko » Fri Nov 04, 2011 7:22 am

Some configs and logs are needed.

n3lThon
OpenVpn Newbie
Posts: 4
Joined: Thu Nov 03, 2011 6:24 pm

Re: VPN Connection problem

Post by n3lThon » Fri Nov 04, 2011 7:35 pm

The ping command works fine, max. 5ms to server (local ip).
The configuration files:

Server:

Code: Select all

proto udp
port 33333
dev tap0
tls-server
comp-lzo
keepalive 10 120
persist-key
persist-tun
float
max-clients 2
server-bridge 192.168.2.1 255.255.255.0 192.168.2.10 192.168.2.50
push "redirect-gateway def1"
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"
ifconfig-pool-persist /etc/openvpn/ipp.txt
log /root/openvpn.log
status /root/openvpn_status.log

tls-auth /etc/openvpn/keys/secret.key
dh /etc/openvpn/keys/dh2048.pem
ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
Client:

Code: Select all

remote <ip>
proto udp
port 33333
dev tap
dev-type tap
tls-client
comp-lzo
keepalive 10 120
persist-key
persist-tun
float
remote-cert-tls server
pull

tls-auth ./keys/tls.key
dh ./keys/dh2048.pem
ca ./keys/ca.crt
cert ./keys/pc.crt
key ./keys/pc.key
IPTABLES (INPUT-> DROP, FORWARD-> DROP, OUTPUT-> ACCEPT)

Code: Select all

iptables -A INPUT -i br0 -j ACCEPT
iptables -A INPUT -i tap0 -j ACCEPT
iptables -A FORWARD -i tap0 -j ACCEPT
Server-> Linux
Client-> Windows

Thanks :)

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: VPN Connection problem

Post by Mimiko » Sat Nov 05, 2011 8:28 am

iptables -A FORWARD -i tap0 -j ACCEPT
Must be an output interface to it: -o eth0, for example.
Try using "proto tcp" and see if is not disconnectng.
Whont the game work under an routed configuration VPN?

n3lThon
OpenVpn Newbie
Posts: 4
Joined: Thu Nov 03, 2011 6:24 pm

Re: VPN Connection problem

Post by n3lThon » Sat Nov 05, 2011 10:18 am

Mimiko wrote:
iptables -A FORWARD -i tap0 -j ACCEPT
Must be an output interface to it: -o eth0, for example.
Try using "proto tcp" and see if is not disconnectng.
Whont the game work under an routed configuration VPN?
I just starting thinking about it today, and I will try. Before I did the bridge I didn't know that I can make full reachable both networks using iptables. Probably I don't need broadcast traffic, so that it's not a problem and for fixed network service I will use iptables to redirect 10.0.0.0 address to 192.168.2.0 and still using the same IP for Windows sharing.

Thanks :)

n3lThon
OpenVpn Newbie
Posts: 4
Joined: Thu Nov 03, 2011 6:24 pm

Re: VPN Connection problem

Post by n3lThon » Mon Nov 07, 2011 10:26 am

I still have the problem. It started working fine, but then I have the same problem.
Some errors:
Mon Nov 7 10:11:25 2011 us=4817 pc1/<ip>:46535 Need IPv6 code in mroute_extract_addr_from_packet
Mon Nov 7 10:08:05 2011 us=921200 read UDPv4 [EMSGSIZE Path-MTU=1492]: Message
too long (code=90)

User avatar
Mimiko
Forum Team
Posts: 1564
Joined: Wed Sep 22, 2010 3:18 am

Re: VPN Connection problem

Post by Mimiko » Mon Nov 07, 2011 6:48 pm

For IPv6 error, just unbind this protocol from the adapter.
The other message may be erradical.

Post Reply