#16898: OpenVPN can't connect to oepnvpn servers of VPNGATE.net
---------------------------+-------------------------------------
  Reporter:  shulong.li@…  |      Owner:  developers
      Type:  defect        |     Status:  new
  Priority:  high          |  Milestone:  Barrier Breaker (trunk)
 Component:  packages      |    Version:  Trunk
Resolution:                |   Keywords:  OpenVPN VPNGate
---------------------------+-------------------------------------

Comment (by anonymous):

 "although the connection was set up correctly, there is no IP address can
 be obtained from server side." what does that even mean? If the connection
 is established, there is an IP. I am running OpenVPN-OpenSSL since years
 with trunk, always worked. Here is a config of mine:

 {{{
 client

 dev tun
 proto udp

 remote ... 1194

 resolv-retry infinite
 nobind
 persist-key

 ca /etc/openvpn/keys/...
 auth-user-pass /etc/openvpn/keys/...

 tls-remote ...

 script-security 2
 route-noexec
 route-up /etc/openvpn/up/route-up.sh
 down /etc/openvpn/down/down.sh

 comp-lzo no
 verb 3

 auth SHA256
 cipher AES-256-CBC
 keysize 256
 tls-cipher ...
 }}}

 Starting a connection:

 {{{
 /usr/sbin/screen -dmS vpn1 /usr/sbin/openvpn --config /etc/openvpn/1.ovpn
 --route-nopull --dev tun0
 }}}

 route-up.sh:


 {{{
 #!/bin/sh

 if [[ $dev == 'tun0' ]]; then
   TABLE='vpn1'
 else
   TABLE='vpn2'
 fi

 UPLOG=/tmp/vpn_up.log
 FILESIZE=$(stat -c%s $UPLOG)
 MAX=2097152
 if [[ $FILESIZE -ge $MAX ]]; then
   echo "$dev, $TABLE: $ifconfig_local -> $common_name, gw:
 $route_vpn_gateway, $(date +%Y-%m-%d-%H:%M)" > $UPLOG
 else
   echo "$dev, $TABLE: $ifconfig_local -> $common_name, gw:
 $route_vpn_gateway, $(date +%Y-%m-%d-%H:%M)" >> $UPLOG
 fi

 ip route flush table $TABLE
 ip route add default via $route_vpn_gateway dev $dev table $TABLE
 iptables -w -t nat -A POSTROUTING -o $dev -j SNAT --to $ifconfig_local

 exit 0
 }}}

 down.sh:


 {{{
 #!/bin/sh

 DOWNLOG=/tmp/vpn_down.log
 FILESIZE=$(stat -c%s $DOWNLOG)
 MAX=2097152
 if [[ $FILESIZE -ge $MAX ]]; then
   echo "$dev: $ifconfig_local => $common_name, $(date +%Y-%m-%d-%H:%M)" >
 $DOWNLOG
 else
   echo "$dev: $ifconfig_local => $common_name, $(date +%Y-%m-%d-%H:%M)" >>
 $DOWNLOG
 fi

 iptables -w -t nat -D POSTROUTING -o $dev -j SNAT --to $ifconfig_local

 exit 0
 }}}

--
Ticket URL: <https://dev.openwrt.org/ticket/16898#comment:3>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to