Quantcast
Channel: Active questions tagged openvpn - Unix & Linux Stack Exchange
Viewing all 825 articles
Browse latest View live

Kill switch using iptables & filtering by group id

$
0
0

I am trying to set up a kill switch using iptables, because my VPN client doesn´t do so. I liked the approach of allowing packets based on group id described here: https://weekly-geekly.github.io/articles/274445/index.html

iptables -A OUTPUT -m owner --gid-owner killswitch -j ACCEPT

When I try to run openvpn command under this gid

sg killswitch -c 'sudo openvpn --config vpn_tcp.ovpn'

openvpn cannot connect to vpn server, seems like iptables doesn't allow packets through. After googling I found out that only main gid of the user is checked by iptables. I am not sure if it is relevant. Could someone help?

P.S. I know that I can also configure iptables simply by allowing specific ports used by openvpn, but I like the group approach better.


OpenVPN - unable to ping LAN

$
0
0

All,

I have an OpenVPN server setup in our Production environment with one client OpenVPN server connected to it. I am setting up a second client connected to the same VPN server. I believe my configuration is correct because I the tunnel came up, and I am able to ping both sides of the tunnel from each of the Client and Server. I have a PC on each side of the tunnel that need the ability to communicate.

NetworkA - 172.21.0.0/16 NetworkB - 192.168.1.0/24

PC-A (172.21.0.101) is behind the OpenVPN Server (172.21.7.13) and can ping the OpenVPN Server and the OpenVPN client. It can successfully ping 192.168.1.29 (OpenVPN client)

PC-B (192.168.1.240) is behind OpenVPN Client, and it can ping the OpenVPN client (192.168.1.29). PC-B cannot ping the OpenVPN Server or PC-A.

Ideally I need these machines to be able to talk, but I seem to be missing something.

Below is the Route Print from PC-A:

    IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0       172.21.0.1     172.21.0.101    266
         10.0.0.0        255.0.0.0      172.21.7.13     172.21.0.101     11
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    306
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    306
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    306
       172.21.0.0      255.255.0.0         On-link      172.21.0.101    266
     172.21.0.101  255.255.255.255         On-link      172.21.0.101    266
   172.21.255.255  255.255.255.255         On-link      172.21.0.101    266
      192.168.1.0    255.255.255.0      172.21.7.13     172.21.0.101     11
    192.168.1.240  255.255.255.255      172.21.7.13     172.21.0.101     11
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    306
        224.0.0.0        240.0.0.0         On-link      172.21.0.101    266
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    306
  255.255.255.255  255.255.255.255         On-link      172.21.0.101    266
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
         10.0.0.0        255.0.0.0      172.21.7.13       1
          0.0.0.0          0.0.0.0       172.21.0.1  Default 
      192.168.1.0    255.255.255.0      172.21.7.13       1
===========================================================================

Below is the Route Print from PC-B:

IPv4 Route Table
===========================================================================
Active Routes:
Network Destination        Netmask          Gateway       Interface  Metric
          0.0.0.0          0.0.0.0      192.168.1.1    192.168.1.240     25
        127.0.0.0        255.0.0.0         On-link         127.0.0.1    331
        127.0.0.1  255.255.255.255         On-link         127.0.0.1    331
  127.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  169.254.169.123  255.255.255.255      192.168.1.1    192.168.1.240     50
  169.254.169.249  255.255.255.255      192.168.1.1    192.168.1.240     50
  169.254.169.250  255.255.255.255      192.168.1.1    192.168.1.240     50
  169.254.169.251  255.255.255.255      192.168.1.1    192.168.1.240     50
  169.254.169.253  255.255.255.255      192.168.1.1    192.168.1.240     50
  169.254.169.254  255.255.255.255      192.168.1.1    192.168.1.240     50
       172.21.0.0      255.255.0.0     192.168.1.29    192.168.1.240     26
      192.168.1.0    255.255.255.0         On-link     192.168.1.240    281
    192.168.1.240  255.255.255.255         On-link     192.168.1.240    281
    192.168.1.255  255.255.255.255         On-link     192.168.1.240    281
        224.0.0.0        240.0.0.0         On-link         127.0.0.1    331
        224.0.0.0        240.0.0.0         On-link     192.168.1.240    281
  255.255.255.255  255.255.255.255         On-link         127.0.0.1    331
  255.255.255.255  255.255.255.255         On-link     192.168.1.240    281
===========================================================================
Persistent Routes:
  Network Address          Netmask  Gateway Address  Metric
  169.254.169.254  255.255.255.255      192.168.1.1      25
  169.254.169.250  255.255.255.255      192.168.1.1      25
  169.254.169.251  255.255.255.255      192.168.1.1      25
  169.254.169.249  255.255.255.255      192.168.1.1      25
  169.254.169.123  255.255.255.255      192.168.1.1      25
  169.254.169.253  255.255.255.255      192.168.1.1      25
       172.21.0.0      255.255.0.0     192.168.1.29       1
===========================================================================

I have the firewalls on both remote PC's turned off at this time. PC-B is an EC2 instance in AWS, but I have allowed ICMP from any location at this time. I am kind of confused to why this would not be working, so any advice is much appreciated.

Please let me know if anymore information is required here.

Thanks

OpenVPN Client and Server on same machine - Server doesn't allow connections when client is connected

$
0
0

I am new to this community and am hopeful that somebody can help me. Please let me know if I haven't posted all required information.

Situation:

  • I have a linux server (raspberry pi, 192.168.1.2) functioning as an OpenVPN client (tun1) to a Paid VPN provider. I do share this VPN connection locally with LAN clients by using the linux server as their default gateway (192.168.1.2). This is working without any issues.

  • On the very same linux server I am running a separate openVPN instance (VPN Server, tun0) to allow WAN clients to connect. This is also working without any issues as long as the VPN Client connection to the Paid VPN provider is not established.

  • My ultimate goal is to share the Paid VPN Connection (tun1) with WAN clients that connect through the separate openVPN server (tun0) instance.

Scheme of my Local Network Setup:

enter image description here

Problem:

  • The openVPN client and the openVPN server instance work fine as long as I don't run them simultaneously. As soon as they openVPN client has a connection to the Paid VPN provider, the WAN clients are unable to connect to the openVPN server.

  • By reviewing the log files I found out that the WAN client handshake fails as soon as the Paid VPN connection is established. I think this is due to the fact that once this Paid VPN connection is established all outgoing internet traffic is routed through the tunnel (tun1) so the client's handshake requests remains unanswered. I do not know how to solve this.

ifconfig

pi@server:~ $ ifconfig -a
eth0      Link encap:Ethernet  HWaddr b8:27:eb:f2:c1:98
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

eth1      Link encap:Ethernet  HWaddr 58:82:a8:8d:9a:fa
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:203 errors:0 dropped:0 overruns:0 frame:0
          TX packets:165 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:22948 (22.4 KiB)  TX bytes:24938 (24.3 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tun0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.77.0.1  P-t-P:10.77.0.2  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

tun1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:10.130.1.70  P-t-P:10.130.1.69  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:100
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

iptables

pi@server:~ $ sudo iptables -L
Chain INPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     udp  --  anywhere             anywhere             udp dpt:1199

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  anywhere             anywhere
ACCEPT     all  --  10.77.0.0/24         anywhere

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination

Route -n (when tun0/tun1 are not running & not connected)

pi@server:~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

Route -n (when tun0 is running & connected)

pi@server:~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
10.77.0.0       10.77.0.2       255.255.255.0   UG    0      0        0 tun0
10.77.0.2       0.0.0.0         255.255.255.255 UH    0      0        0 tun0
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

Route -n (when tun1 is running & connected)

pi@raspi-cyberghost:~ $ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.130.0.133    128.0.0.0       UG    0      0        0 tun1
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth1
10.77.0.0       10.77.0.2       255.255.255.0   UG    0      0        0 tun0
10.77.0.2       0.0.0.0         255.255.255.255 UH    0      0        0 tun0
10.130.0.1      10.130.0.133    255.255.255.255 UGH   0      0        0 tun1
10.130.0.133    0.0.0.0         255.255.255.255 UH    0      0        0 tun1
107.183.241.2   192.168.1.1     255.255.255.255 UGH   0      0        0 eth1
128.0.0.0       10.130.0.133    128.0.0.0       UG    0      0        0 tun1
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth1

OpenVPN Server (tun0) error log when trying to connect while OpenVPN client (tun1) is connected

Tue Mar 21 08:06:19 2017 us=593849 172.56.28.50:24844 TLS: Initial packet from [AF_INET]172.56.28.50:24844, sid=d25df6fb 2136a7cc
Tue Mar 21 08:07:19 2017 us=128339 172.56.28.50:24844 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Tue Mar 21 08:07:19 2017 us=128603 172.56.28.50:24844 TLS Error: TLS handshake failed
Tue Mar 21 08:07:19 2017 us=129254 172.56.28.50:24844 SIGUSR1[soft,tls-error] received, client-instance restarting

How high can I tune my network stack buffer size to increase network performance due to long distance server latency?

$
0
0

I followed this guide: https://www.cyberciti.biz/faq/linux-tcp-tuning/

I added the following values into my /etc/sysctl.conf file:

net.core.wmem_max=12582912
net.core.rmem_max=12582912
net.ipv4.tcp_rmem= 10240 87380 12582912
net.ipv4.tcp_wmem= 10240 87380 12582912
net.ipv4.tcp_window_scaling = 1
net.ipv4.tcp_timestamps = 1
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 5000

The server I'm using is just for OpenVPN usage and has 1GB of free memory. The guide currently sets the buffer size to 12MB, but I want to MAXIMUM I can set.

How can I adjust these settings to the MAX? My main goal is to increase performance over an OpenVPN connection that has a latency of 200ms-300ms.

About OpenVPN server

$
0
0

I did an OpenVPN setup in local network and communication passes between the client and the server. The problem is that only I can not communicate two customers. I ask for help if possible.

Openvpn-as : Depends: python-pyrad but it is not installable

$
0
0

I am using Parrot OS lastest version. I have tried and all the other variations of upgrade, such as the following,

apt --fix-broken install

I am getting the following error after running apt update && apt -y install openvpn-as ;

Hit:1 http://as-repository.openvpn.net/as/debian buster InRelease
Ign:2 http://dl.google.com/linux/chrome/deb stable InRelease                                 
Hit:3 http://dl.google.com/linux/chrome/deb stable Release                                   
Hit:4 https://deb.parrot.sh/parrot rolling InRelease                                        
Hit:6 https://deb.parrot.sh/parrot rolling-security InRelease         
Hit:7 https://packagecloud.io/AtomEditor/atom/any any InRelease       
Reading package lists... Done                                   
Building dependency tree       
Reading state information... Done
1 package can be upgraded. Run 'apt list --upgradable' to see it.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 openvpn-as : Depends: python-pyrad but it is not installable
E: Unable to correct problems, you have held broken packages.

There are two up-gradable, one of which is rolling and provider doesn't advice to upgrade and it can't be upgraded whatever I tried and up-gradables are as follows,

mimikatz/rolling 2.2.0-git20200208-0kali1 all [upgradable from: 2.2.0-git20200104-1parrot1]
mimikatz/now 2.2.0-git20200104-1parrot1 all [installed,upgradable to: 2.2.0-git20200208-0kali1]

My parrot repository is as follows,

# parrot repository
# this file was automatically generated by parrot-mirror-selector
deb https://deb.parrot.sh/parrot/ rolling main contrib non-free
#deb-src https://deb.parrot.sh/parrot/ rolling main contrib non-free
deb https://deb.parrot.sh/parrot/ rolling-security main contrib non-free
#deb-src https://deb.parrot.sh/parrot/ rolling-security main contrib non-free

I cannot install python-pyrad, although i installed python3-pyrad. How can I fix the problem?

(OPENVPN/OPENSSL) Configuration file routines:STR_COPY:variable has no value:conf_def

$
0
0

I can't run "openssl req" to create a new key, the output presents an error

error on line 39 of /etc/openvpn/openvpn-ssl.cnf
140264035997600:error:0E065068:configuration file routines:STR_COPY:variable has no value:conf_def.c:584:line 39

line 39 of openvpn-ssl.cnf reads:

dir             = $dir/keys/    # Where everything is kept

Obs.: I search and found this article, but it is not useful. I don't have a vars file https://ubuntuforums.org/showthread.php?t=2218935

Can only ping OpenVPN server, not other hosts on VPN network

$
0
0

I installed OpenVPN server successfully on a server (X.X.X.X/32). Here is my OpenVPN config file:

port 1194
proto udp6
dev tun

ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh.pem
crl-verify /etc/openvpn/keys
crl-verify /etc/openvpn/keys/ca-crl.pem
tls-auth /etc/openvpn/keys/ta.key 0
tls-server
auth SHA256
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384:TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384:TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256

server 10.109.0.0 255.255.0.0
ifconfig-pool-persist ipp.txt

push "route 192.168.59.0 255.255.255.0"
keepalive 5 30
compress lzo
persist-key
persist-tun
user nobody
group nogroup


status openvpn-status.log
status-version 1
log-append /var/log/openvpn.log
verb 3

On that server (X.X.X.X/32) I have a vagrant machine running in private network (vm.network 'private_network') with ip 192.168.59.2.

After connecting to OpenVPN from my localhost I would like to ping 192.168.59.2. I can only ping 192.168.59.1. As you can see Vagrant private network, and OpenVPN network is different. Please somebody can help with this issue? I'm also attaching my ovpn (snippet) file:

tls-client
auth SHA256
cipher AES-256-CBC
remote-cert-tls server
tls-version-min 1.2

proto udp
remote X.X.X.X 1194
dev tun
resolv-retry 5
nobind
keepalive 5 30
compress lzo
persist-key
persist-tun
verb 3
route-method exe
route-delay 2
key-direction 1

EDIT1: I'm using 192.168.59.2 because vagrant shows a warning for vagrant up:

guest: You assigned a static IP ending in ".1" to this machine. ==> guest: This is very often used by the router and can cause the ==> guest: network to not work properly. If the network doesn't work ==> guest: properly, try changing this IP.

route -n output on Vagrant machine:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 enp0s3
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s3
10.0.2.2        0.0.0.0         255.255.255.255 UH    100    0        0 enp0s3
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.59.0    0.0.0.0         255.255.255.0   U     0      0        0 enp0s8

EDIT2: Vagrant's machine ip changed to 192.168.59.1. I also added the following line to ovpn file: route 192.168.59.0 255.255.255.0 From localhost I can now ping 192.168.59.1 after connecting to vpn.


Make user made entries in /etc/hosts permanent

$
0
0

I use Juniper Networks network connect to connect to the office network. Once i am inside the office network, i check the server ips and add entries for them in /etc/hosts file like,

10.199.xx.yy  offi

When i come out of the VPN network into public domain, network connect resets all changes it made and brings my /etc/hosts file to the state it was in before entering the network. I think, this behaviour is Juniper Network connect's expected behaviour as it adds an entry on the top of the hosts file as,

# BEGIN hosts added by Network Connect
61.xx.yy.zz  vpn.ip.com
# END hosts added by Network Connect

But in trying to reset its own entries, network connect reset the user made entries as well..

I tried to make /etc/hosts as immutable using chattr +i /etc/hosts but that caused my vpn login to fail as network connect comes out, if it fails to write into /etc/hosts

starting openvpn server fails with Options error: --client-config-dir fails

$
0
0

I'm working on setting up an openvpn server. I'm using the standard sources of debian jessie and easy-rsa as an CA.

Everything worked fine until I've tried to start openvpn via init script. When I'm running /etc/init.d/openvpn start following error comes up in /var/log/daemon.log

Options error: --client-config-dir fails with "/etc/openvpn/easy-rsa/keys/crl.jail//etc/openvpn/server.ccd": No such file or directory

Has someone of you a idea where this mess with the paths comes from? The directory what is set in the config file exists. The server.conf file:

port 1194
proto udp
dev tun

comp-lzo
keepalive 10 120

persist-key
persist-tun
user nobody
group nogroup

chroot /etc/openvpn/easy-rsa/keys/crl.jail
crl-verify crl.pem

ca /etc/openvpn/easy-rsa/keys/ca.crt
dh /etc/openvpn/easy-rsa/keys/dh2048.pem
tls-auth /etc/openvpn/easy-rsa/keys/ta.key 0
key /etc/openvpn/easy-rsa/keys/server.key
cert /etc/openvpn/easy-rsa/keys/server.crt

ifconfig-pool-persist /var/lib/openvpn/server.ipp
client-config-dir /etc/openvpn/server.ccd
status /var/log/openvpn/server.log
verb 4

# virtual subnet unique for openvpn to draw client addresses from
# the server will be configured with x.x.x.1
# important: must not be used on your network
server 10.254.1.0 255.255.255.0

# push routes to clients to allow them to reach private subnets
push "route 10.0.0.0 255.0.0.0"

THX for your help.

OpenVpn Missing Parameter tls-crypt Config Problem

$
0
0

Hello there I added a new user to my server and the .ovpn file seems to have so missing things which I cant understand. I got a same config with other Keys ofc. and the same parameters for another machine and it works fine.. Here are the parameters.

client
dev tun
proto udp
remote 207.180.225.35 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
tls-crypt
verb 3
<ca>
-----BEGIN CERTIFICATE-----
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
#******************************************************************************************
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
#*********************************************
-----END OpenVPN Static key V1-----
</tls-crypt>

The Error Message is:

Sun Oct 27 16:37:34 2019 Unrecognized option or missing parameter(s) in /home/vpnOrdner/upper.ovpn:13: block-outside-dns (2.3.9)
Options error: Unrecognized option or missing parameter(s) in /home/vpnOrdner/upper.ovpn:18: tls-crypt (2.3.9)
Use --help for more information.

The client machine runs debian (openPli) and the server runs on debian 10

WHAT I TRIED:

I just deleted the line with "block-outside-dns" but it didnt fix the error with tls-crypt.

Would be great if you can help me!

openvpn routes on ubuntu 18.04

$
0
0

Hi I have a server running with an OpenVPN server on Ubuntu LTS 18.04 from a digitaloceans droplet. And I have 2 routers connecting too it, sadly not in the way I want too right now.

Thu Feb 27 15:25:45 2020 us=816377 client3/213.126.234.138:40024 MULTI: bad source address from client [192.168.10.1], packet dropped

It is currently running and the routers are communicating with it. However the router packages as seen in the above example are dropped. I tried looking at similar threads but these didn't give me the answer I need.

Here is the serverside config.

#################################################
# Sample OpenVPN 2.0 config file for            #
# multi-client server.                          #
#                                               #
# This file is for the server side              #
# of a many-clients <-> one-server              #
# OpenVPN configuration.                        #
#                                               #
# OpenVPN also supports                         #
# single-machine <-> single-machine             #
# configurations (See the Examples page         #
# on the web site for more info).               #
#                                               #
# This config should work on Windows            #
# or Linux/BSD systems.  Remember on            #
# Windows to quote pathnames and use            #
# double backslashes, e.g.:                     #
# "C:\\Program Files\\OpenVPN\\config\\foo.key" #
#                                               #
# Comments are preceded with '#' or ';'         #
#################################################

# Which local IP address should OpenVPN
# listen on? (optional)
;local a.b.c.d

# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one.  You will need to
# open up this port on your firewall.
port 1194

# TCP or UDP server?
;proto tcp
proto udp

# "dev tun" will create a routed IP tunnel,
# "dev tap" will create an ethernet tunnel.
# Use "dev tap0" if you are ethernet bridging
# and have precreated a tap0 virtual interface
# and bridged it with your ethernet interface.
# If you want to control access policies
# over the VPN, you must create firewall
# rules for the the TUN/TAP interface.
# On non-Windows systems, you can give
# an explicit unit number, such as tun0.
# On Windows, use "dev-node" for this.
# On most systems, the VPN will not function
# unless you partially or fully disable
# the firewall for the TUN/TAP interface.
;dev tap
dev tun

# Windows needs the TAP-Win32 adapter name
# from the Network Connections panel if you
# have more than one.  On XP SP2 or higher,
# you may need to selectively disable the
# Windows firewall for the TAP adapter.
# Non-Windows systems usually don't need this.
;dev-node MyTap

# SSL/TLS root certificate (ca), certificate
# (cert), and private key (key).  Each client
# and the server must have their own cert and
# key file.  The server and all clients will
# use the same ca file.
#
# See the "easy-rsa" directory for a series
# of scripts for generating RSA certificates
# and private keys.  Remember to use
# a unique Common Name for the server
# and each of the client certificates.
#
# Any X509 key management system can be used.
# OpenVPN can also use a PKCS #12 formatted key file
# (see "pkcs12" directive in man page).
ca ca.crt
cert teltonika-vpn.crt
key teltonika-vpn.key  # This file should be kept secret

# Diffie hellman parameters.
# Generate your own with:
#   openssl dhparam -out dh2048.pem 2048
dh dh2048.pem

# Network topology
# Should be subnet (addressing via IP)
# unless Windows clients v2.0.9 and lower have to
# be supported (then net30, i.e. a /30 per client)
# Defaults to net30 (not recommended)
;topology subnet

# Configure server mode and supply a VPN subnet
# for OpenVPN to draw client addresses from.
# The server will take 10.8.0.1 for itself,
# the rest will be made available to clients.
# Each client will be able to reach the server
# on 10.8.0.1. Comment this line out if you are
# ethernet bridging. See the man page for more info.
server 10.8.0.0 255.255.255.0

# Maintain a record of client <-> virtual IP address
# associations in this file.  If OpenVPN goes down or
# is restarted, reconnecting clients can be assigned
# the same virtual IP address from the pool that was
# previously assigned.
ifconfig-pool-persist /var/log/openvpn/ipp.txt

# Configure server mode for ethernet bridging.
# You must first use your OS's bridging capability
# to bridge the TAP interface with the ethernet
# NIC interface.  Then you must manually set the
# IP/netmask on the bridge interface, here we
# assume 10.8.0.4/255.255.255.0.  Finally we
# must set aside an IP range in this subnet
# (start=10.8.0.50 end=10.8.0.100) to allocate
# to connecting clients.  Leave this line commented
# out unless you are ethernet bridging.
;server-bridge 10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100

# Configure server mode for ethernet bridging
# using a DHCP-proxy, where clients talk
# to the OpenVPN server-side DHCP server
# to receive their IP address allocation
# and DNS server addresses.  You must first use
# your OS's bridging capability to bridge the TAP
# interface with the ethernet NIC interface.
# Note: this mode only works on clients (such as
# Windows), where the client-side TAP adapter is
# bound to a DHCP client.
;server-bridge

# Push routes to the client to allow it
# to reach other private subnets behind
# the server.  Remember that these
# private subnets will also need
# to know to route the OpenVPN client
# address pool (10.8.0.0/255.255.255.0)
# back to the OpenVPN server.
push "route 192.168.10.0 255.255.255.0"
push "route 192.168.20.0 255.255.255.0"

# To assign specific IP addresses to specific
# clients or if a connecting client has a private
# subnet behind it that should also have VPN access,
# use the subdirectory "ccd" for client-specific
# configuration files (see man page for more info).

# EXAMPLE: Suppose the client
# having the certificate common name "Thelonious"
# also has a small subnet behind his connecting
# machine, such as 192.168.40.128/255.255.255.248.
# First, uncomment out these lines:
;client-config-dir ccd
;route 192.168.40.128 255.255.255.248
# Then create a file ccd/Thelonious with this line:
#   iroute 192.168.40.128 255.255.255.248
# This will allow Thelonious' private subnet to
# access the VPN.  This example will only work
# if you are routing, not bridging, i.e. you are
# using "dev tun" and "server" directives.

# EXAMPLE: Suppose you want to give
# Thelonious a fixed VPN IP address of 10.9.0.1.
# First uncomment out these lines:
;client-config-dir ccd
;route 10.9.0.0 255.255.255.252
# Then add this line to ccd/Thelonious:
#   ifconfig-push 10.9.0.1 10.9.0.2

# Suppose that you want to enable different
# firewall access policies for different groups
# of clients.  There are two methods:
# (1) Run multiple OpenVPN daemons, one for each
#     group, and firewall the TUN/TAP interface
#     for each group/daemon appropriately.
# (2) (Advanced) Create a script to dynamically
#     modify the firewall in response to access
#     from different clients.  See man
#     page for more info on learn-address script.
;learn-address ./script

# If enabled, this directive will configure
# all clients to redirect their default
# network gateway through the VPN, causing
# all IP traffic such as web browsing and
# and DNS lookups to go through the VPN
# (The OpenVPN server machine may need to NAT
# or bridge the TUN/TAP interface to the internet
# in order for this to work properly).
push "redirect-gateway def1 bypass-dhcp"

# Certain Windows-specific network settings
# can be pushed to clients, such as DNS
# or WINS server addresses.  CAVEAT:
# http://openvpn.net/faq.html#dhcpcaveats
# The addresses below refer to the public
# DNS servers provided by opendns.com.
push "dhcp-option DNS 208.67.222.222"
push "dhcp-option DNS 208.67.220.220"

# Uncomment this directive to allow different
# clients to be able to "see" each other.
# By default, clients will only see the server.
# To force clients to only see the server, you
# will also need to appropriately firewall the
# server's TUN/TAP interface.
;client-to-client

# Uncomment this directive if multiple clients
# might connect with the same certificate/key
# files or common names.  This is recommended
# only for testing purposes.  For production use,
# each client should have its own certificate/key
# pair.
#
# IF YOU HAVE NOT GENERATED INDIVIDUAL
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
# UNCOMMENT THIS LINE OUT.
;duplicate-cn

# The keepalive directive causes ping-like
# messages to be sent back and forth over
# the link so that each side knows when
# the other side has gone down.
# Ping every 10 seconds, assume that remote
# peer is down if no ping received during
# a 120 second time period.
keepalive 10 120

# For extra security beyond that provided
# by SSL/TLS, create an "HMAC firewall"
# to help block DoS attacks and UDP port flooding.
#
# Generate with:
#   openvpn --genkey --secret ta.key
#
# The server and each client must have
# a copy of this key.
# The second parameter should be '0'
# on the server and '1' on the clients.
tls-auth ta.key 0 # This file is secret
key-direction 0

# Select a cryptographic cipher.
# This config item must be copied to
# the client config file as well.
# Note that v2.4 client/server will automatically
# negotiate AES-256-GCM in TLS mode.
# See also the ncp-cipher option in the manpage
cipher AES-256-CBC
auth SHA512

# Enable compression on the VPN link and push the
# option to the client (v2.4+ only, for earlier
# versions see below)
;compress lz4-v2
;push "compress lz4-v2"

# For compression compatible with older clients use comp-lzo
# If you enable it here, you must also
# enable it in the client config file.
;comp-lzo

# The maximum number of concurrently connected
# clients we want to allow.
;max-clients 100

# It's a good idea to reduce the OpenVPN
# daemon's privileges after initialization.
#
# You can uncomment this out on
# non-Windows systems.
user openvpn
;group nogroup

# The persist options will try to avoid
# accessing certain resources on restart
# that may no longer be accessible because
# of the privilege downgrade.
persist-key
persist-tun

# Output a short status file showing
# current connections, truncated
# and rewritten every minute.
status /var/log/openvpn/openvpn-status.log

# By default, log messages will go to the syslog (or
# on Windows, if running as a service, they will go to
# the "\Program Files\OpenVPN\log" directory).
# Use log or log-append to override this default.
# "log" will truncate the log file on OpenVPN startup,
# while "log-append" will append to it.  Use one
# or the other (but not both).
log         /var/log/openvpn/openvpn.log
log-append  /var/log/openvpn/openvpn.log

# Set the appropriate level of log
# file verbosity.
#
# 0 is silent, except for fatal errors
# 4 is reasonable for general usage
# 5 and 6 can help to debug connection problems
# 9 is extremely verbose
verb 4

# Silence repeating messages.  At most 20
# sequential messages of the same message
# category will be output to the log.
;mute 20

# Notify the client that when the server restarts so it
# can automatically reconnect.
explicit-exit-notify 1

And my IP route config, which I don't want to make a bigger mess of.

default via 64.227.64.1 dev eth0 proto static 
10.8.0.0/24 via 10.8.0.2 dev tun0 
10.8.0.2 dev tun0 proto kernel scope link src 10.8.0.1 
10.18.0.0/16 dev eth0 proto kernel scope link src 10.18.0.23 
64.227.64.0/20 dev eth0 proto kernel scope link src 64.227.76.90 
172.16.0.0/24 dev tun0 scope link 
192.168.10.0/24 dev tun0 scope link 

I have been working on this for a couple of hours now. I made some progress from other issues. Can anyone tell me what the next (and supposedly) final step is?

OpenVPN On Centos: TUN no longer working

$
0
0

I had an OpenVPN TUN configuration which used to work, but stopped working some time last year. I had the help of a consultant who got it working using TAP, but TUN just doesn’t work. If I try, the service just doesn’t restart. I can’t even find any useful error messages, but changing TUN to TAP is the only thing that works.

I need TUN if I want to connect my iOS devices.

Has something changed, or broken in OpenVPN? What can I do to get to the bottom of this?

I am running Centos 6 which is otherwise up to date.

Make systemd reload only single openvpn process and not the whole group

$
0
0

I'm running several openvpn instances on my server with debian stable; as well some clients as a server instance. Right now, when one of these instances fails, systemd seems to kill and restart the whole group of processes:

May 27 12:09:44 tritone systemd[1]: openvpn@client_uk.service: main process exited, code=exited, status=1/FAILURE
May 27 12:09:44 tritone systemd[1]: Unit openvpn@client_uk.service entered failed state.
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_rhode...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN connection to client_uk...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to client_ukraine...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN connection to server_udp...
May 27 12:10:01 tritone systemd[1]: Stopping OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Starting OpenVPN service...
May 27 12:10:01 tritone systemd[1]: Started OpenVPN service.
...

This is as well undesired as superfluous imho. Restarting the single failed service would suffice. This is the systemd config from /etc/systemd/system/multi-user.target.wants/openvpn.service:

[Unit]
Description=OpenVPN service
After=network.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/true
ExecReload=/bin/true
WorkingDirectory=/etc/openvpn

[Install]
WantedBy=multi-user.target

I have seen configs, where ExecReload had been set to kill -HUP $MAINPID, and also my server seems to do this, as systemctl status says:

  Process: 5893 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)

So what I don't understand, where is this kill command defined, if the systemd config ExecReload actually says otherwise? Also, why is the service getting restarted, even if Type=oneshot is defined? Am I looking at the right file at all?

And how should the restart command look like? Kill won't work, as the process is supposedly dead already.

Edit: I found /lib/systemd/system-generators/openvpn-generator and /lib/systemd/system/openvpn@.service now, nevertheless, it remains unclear, when they get run or executed. The generator seems to fail, as none of the links actually got created, probably due to selinux restrictions. Nevertheless, this file seems to be used for init. So I wonder, why is the dummy file /etc/systemd/system/multi-user.target.wants/openvpn.service created at all?

Passthrough of OpenVPN clients to local network

$
0
0

Ahoy friends. Unfortunately i don't have that much knowledge about OpenVPN but at least i want to try to get my idea working. Currently i'm using a VoIP device connected to my local area network, and it receives an IP by the network's dhcp server. Now i will stay for some time in Ecuador, and i got an OpenWRT device, using it as OpenVPN client to connect to my OpenVPN server inside of the local area network here at home. So i want to bridge the VoIP device, connected to the OpenWRT device, configured as bridge as well, into my local area network, to use it, having the same phone number like in my current country.

I used this script to configure my OpenVPN server automatically, because it seems to be quite complicated.

https://github.com/angristan/openvpn-install

But this script only provides NAT mode, using the tun device. Is there a easy way to get it working using tap, or bridge mode, to let the clients obtain an ip address by the local network's dhcp?

There is my current /etc/openvpn/openvpn.conf

port 1194
proto udp6
dev tun
user nobody
group nogroup
persist-key
persist-tun
keepalive 10 120
topology subnet
server 10.8.0.0 255.255.255.0
ifconfig-pool-persist ipp.txt
push "dhcp-option DNS 1.0.0.1"
push "dhcp-option DNS 1.1.1.1"
push "redirect-gateway def1 bypass-dhcp"
server-ipv6 fd42:42:42:42::/112
tun-ipv6
push tun-ipv6
push "route-ipv6 2000::/3"
push "redirect-gateway ipv6"
compress lz4-v2
dh none
ecdh-curve prime256v1
tls-crypt tls-crypt.key 0
crl-verify crl.pem
ca ca.crt
cert server_SvMuc9xhzr1ktbQ9.crt
key server_SvMuc9xhzr1ktbQ9.key
auth SHA256
cipher AES-128-GCM
ncp-ciphers AES-128-GCM
tls-server
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
status /var/log/openvpn/status.log
verb 3

iptable rules

-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT
-A INPUT -i enp1s0 -p udp -m udp --dport 1194 -j ACCEPT
-A INPUT -i tun0 -j ACCEPT
-A FORWARD -i tun0 -o enp1s0 -j ACCEPT
-A FORWARD -i enp1s0 -o tun0 -j ACCEPT

I hope someone can help me in order to get it working! Thanks in advance.


Can only ping OpenVPN server, not other guests (host-only network) on VPN network

$
0
0

I installed OpenVPN server successfully on a server (X.X.X.X/32). Here is my OpenVPN config file:

port 1194
proto udp6
dev tun

ca /etc/openvpn/keys/ca.crt
cert /etc/openvpn/keys/server.crt
key /etc/openvpn/keys/server.key
dh /etc/openvpn/keys/dh.pem
crl-verify /etc/openvpn/keys
crl-verify /etc/openvpn/keys/ca-crl.pem
tls-auth /etc/openvpn/keys/ta.key 0
tls-server
auth SHA256
cipher AES-256-CBC
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384:TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384:TLS-DHE-RSA-WITH-AES-256-GCM-SHA384:TLS-ECDHE-ECDSA-WITH-AES-256-CBC-SHA384:TLS-ECDHE-RSA-WITH-AES-256-CBC-SHA384:TLS-DHE-RSA-WITH-AES-256-CBC-SHA256

server 10.109.0.0 255.255.0.0
ifconfig-pool-persist ipp.txt

push "route 192.168.59.0 255.255.255.0"
keepalive 5 30
compress lzo
persist-key
persist-tun
user nobody
group nogroup


status openvpn-status.log
status-version 1
log-append /var/log/openvpn.log
verb 3

On that server (X.X.X.X/32) I have a vagrant machine running in (host-only network) private network (vm.network 'private_network') with ip 192.168.59.2.

After connecting to OpenVPN from my localhost I would like to ping 192.168.59.2. I can only ping 192.168.59.1. As you can see Vagrant private network, and OpenVPN network is different. Please somebody can help with this issue? I'm also attaching my ovpn (snippet) file:

tls-client
auth SHA256
cipher AES-256-CBC
remote-cert-tls server
tls-version-min 1.2

proto udp
remote X.X.X.X 1194
dev tun
resolv-retry 5
nobind
keepalive 5 30
compress lzo
persist-key
persist-tun
verb 3
route-method exe
route-delay 2
key-direction 1

EDIT1: I'm using 192.168.59.2 because vagrant shows a warning for vagrant up:

guest: You assigned a static IP ending in ".1" to this machine. ==> guest: This is very often used by the router and can cause the ==> guest: network to not work properly. If the network doesn't work ==> guest: properly, try changing this IP.

route -n output on Vagrant machine:

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.2.2        0.0.0.0         UG    100    0        0 enp0s3
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 enp0s3
10.0.2.2        0.0.0.0         255.255.255.255 UH    100    0        0 enp0s3
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.59.0    0.0.0.0         255.255.255.0   U     0      0        0 enp0s8

EDIT2: Vagrant's machine ip changed to 192.168.59.1. I also added the following line to ovpn file: route 192.168.59.0 255.255.255.0 From localhost I can now ping 192.168.59.1 after connecting to vpn, but I'm still unable to ping 192.168.59.2.

Remove redundant openvpn config service from Systemd

$
0
0

I used to have a config for openvpn. After upgrading to 18.04 it started behaving differently in relation to systemd, my syslog gets continuously spammed with connection attempts:

ovpn-login[5191]: Options error: In [CMD-LINE]:1: Error opening configuration file: /etc/openvpn/login.conf
ovpn-login[5191]: Use --help for more information.
systemd[1]: openvpn@login.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: openvpn@login.service: Failed with result 'exit-code'.

The login.conf does not exist and should not exist - I want to clean this up and get rid of the entry so it stops trying to connect to a service that doesn't exist.

I've tried systemctl kill openvpn@login.service, systemctl disable openvpn@login.service both with systemctl daemon-reload afterwards to no avail.

However, there is no file that matches openvpn@login.service anywhere, it is templated from /lib/systemd/system/openvpn-client@.service.

Presumably I need to keep that file around should I want to add some VPN configs in the future. I did try removing it and doing systemctl daemon-reload as per an answer elsewhere on StackExchange, again, to no avail.

How do I get rid of this spurious systemd configuration entry?


Edit: even after apt purge openvpn and trying to remove all traces it still has:

openvpn@login.service: Failed to schedule restart job: Unit openvpn@login.service not found.

Where is it picking this up from?

How to fix this eth0 and eth1, where traffic going out via eth0 is failing?

$
0
0

I have two public IPs. One's connected to eth0 and one to eth1, from 2 separate routers as complete DMZ towards the LAN IP.

I added this following:

ip rule add from 10.0.0.108/32 table 1 # outbound
ip rule add to 10.0.0.108/32 table 1   # inbound
ip route add default via 10.0.0.1 dev eth0 table 1
ip rule add from 10.0.0.100/32 table 2 # outbound
ip rule add to 10.0.0.100/32 table 2   # inbound
ip route add default via 10.0.0.1 dev eth1 table 2

Since adding this above, I've been having problems sending traffic correctly for inbound and outbound.

For example:

$ ping -I eth0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.0.0.108 eth0: 56(84) bytes of data.
From 10.0.0.108 icmp_seq=2 Destination Host Unreachable
From 10.0.0.108 icmp_seq=3 Destination Host Unreachable
From 10.0.0.108 icmp_seq=4 Destination Host Unreachable

$ ping -I eth1 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.0.0.28 eth1: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=48 time=14.6 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=48 time=14.6 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1233ms
rtt min/avg/max/mdev = 14.611/14.639/14.667/0.028 ms

How do I use ip rule add from/to method to fix the eth0 (from/to), but without breaking the eth1 (eth1 is working perfect).

Configuring OpenVPN on Asus router

$
0
0

I would like to configure VPN server on my home AsusWrt router. I have created OpenVpn server on my router, did OpenVPN client installation and configuration in my remote PC.

Home network with AsusWrt also uses 192.168.1.xxx 255.255.255.0 network which contains Linux PC with 192.168.1.222. Currently I can't reach 192.168.1.222 from remote PC. What I should perform in order to connect from remote PC to Linux PC 192.168.1.222 in home network via SSH.

Log file from OpenVPN client:

Sun Jan 05 18:28:54 2020 OpenVPN 2.4.8 x86_64-w64-mingw32 [SSL (OpenSSL)] [LZO] [LZ4] [PKCS11] [AEAD] built on Oct 31 2019
Sun Jan 05 18:28:54 2020 Windows version 6.2 (Windows 8 or greater) 64bit
Sun Jan 05 18:28:54 2020 library versions: OpenSSL 1.1.0l  10 Sep 2019, LZO 2.10
Sun Jan 05 18:28:57 2020 WARNING: --ns-cert-type is DEPRECATED.  Use --remote-cert-tls instead.
Sun Jan 05 18:28:58 2020 TCP/UDP: Preserving recently used remote address: [AF_INET]78.61.152.172:1194
Sun Jan 05 18:28:58 2020 UDP link local: (not bound)
Sun Jan 05 18:28:58 2020 UDP link remote: [AF_INET]78.61.152.172:1194
Sun Jan 05 18:28:58 2020 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sun Jan 05 18:28:58 2020 [RT-AC87U] Peer Connection Initiated with [AF_INET]78.61.152.172:1194
Sun Jan 05 18:28:59 2020 open_tun
Sun Jan 05 18:28:59 2020 TAP-WIN32 device [Local Area Connection] opened: \\.\Global\{63456A0B-A368-49F1-A830-23CC88608ACE}.tap
Sun Jan 05 18:28:59 2020 Notified TAP-Windows driver to set a DHCP IP/netmask of 10.8.0.10/255.255.255.252 on interface {63456A0B-A368-49F1-A830-23CC88608ACE} [DHCP-serv: 10.8.0.9, lease-time: 31536000]
Sun Jan 05 18:28:59 2020 Successful ARP Flush on interface [17] {63456A0B-A368-49F1-A830-23CC88608ACE}
Sun Jan 05 18:29:34 2020 Warning: route gateway is not reachable on any active network adapters: 10.8.0.9
Sun Jan 05 18:29:34 2020 Warning: route gateway is not reachable on any active network adapters: 10.8.0.9
Sun Jan 05 18:29:34 2020 SYSTEM ROUTING TABLE
Sun Jan 05 18:29:34 2020 0.0.0.0 0.0.0.0 192.168.43.1 p=0 i=13 t=4 pr=3 a=2263 h=0 m=55/0/0/0/0
Sun Jan 05 18:29:34 2020 127.0.0.0 255.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=2 a=783184 h=0 m=331/0/0/0/0
Sun Jan 05 18:29:34 2020 127.0.0.1 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=2 a=783184 h=0 m=331/0/0/0/0
Sun Jan 05 18:29:34 2020 127.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=2 a=783184 h=0 m=331/0/0/0/0
Sun Jan 05 18:29:34 2020 169.254.0.0 255.255.0.0 169.254.255.134 p=0 i=17 t=3 pr=2 a=2246 h=0 m=281/0/0/0/0
Sun Jan 05 18:29:34 2020 169.254.255.134 255.255.255.255 169.254.255.134 p=0 i=17 t=3 pr=2 a=2246 h=0 m=281/0/0/0/0
Sun Jan 05 18:29:34 2020 169.254.255.255 255.255.255.255 169.254.255.134 p=0 i=17 t=3 pr=2 a=2246 h=0 m=281/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.43.0 255.255.255.0 192.168.43.60 p=0 i=13 t=3 pr=2 a=2263 h=0 m=311/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.43.60 255.255.255.255 192.168.43.60 p=0 i=13 t=3 pr=2 a=2263 h=0 m=311/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.43.255 255.255.255.255 192.168.43.60 p=0 i=13 t=3 pr=2 a=2263 h=0 m=311/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.199.0 255.255.255.0 192.168.199.1 p=0 i=22 t=3 pr=2 a=2883 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.199.1 255.255.255.255 192.168.199.1 p=0 i=22 t=3 pr=2 a=2883 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.199.255 255.255.255.255 192.168.199.1 p=0 i=22 t=3 pr=2 a=2883 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.220.0 255.255.255.0 192.168.220.1 p=0 i=12 t=3 pr=2 a=2889 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.220.1 255.255.255.255 192.168.220.1 p=0 i=12 t=3 pr=2 a=2889 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 192.168.220.255 255.255.255.255 192.168.220.1 p=0 i=12 t=3 pr=2 a=2889 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 224.0.0.0 240.0.0.0 127.0.0.1 p=0 i=1 t=3 pr=2 a=783184 h=0 m=331/0/0/0/0
Sun Jan 05 18:29:34 2020 224.0.0.0 240.0.0.0 192.168.43.60 p=0 i=13 t=3 pr=2 a=783166 h=0 m=311/0/0/0/0
Sun Jan 05 18:29:34 2020 224.0.0.0 240.0.0.0 169.254.255.134 p=0 i=17 t=3 pr=2 a=84001 h=0 m=281/0/0/0/0
Sun Jan 05 18:29:34 2020 224.0.0.0 240.0.0.0 192.168.199.1 p=0 i=22 t=3 pr=2 a=2890 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 224.0.0.0 240.0.0.0 192.168.220.1 p=0 i=12 t=3 pr=2 a=2890 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 255.255.255.255 255.255.255.255 127.0.0.1 p=0 i=1 t=3 pr=2 a=783184 h=0 m=331/0/0/0/0
Sun Jan 05 18:29:34 2020 255.255.255.255 255.255.255.255 192.168.43.60 p=0 i=13 t=3 pr=2 a=783166 h=0 m=311/0/0/0/0
Sun Jan 05 18:29:34 2020 255.255.255.255 255.255.255.255 169.254.255.134 p=0 i=17 t=3 pr=2 a=84001 h=0 m=281/0/0/0/0
Sun Jan 05 18:29:34 2020 255.255.255.255 255.255.255.255 192.168.199.1 p=0 i=22 t=3 pr=2 a=2890 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 255.255.255.255 255.255.255.255 192.168.220.1 p=0 i=12 t=3 pr=2 a=2890 h=0 m=291/0/0/0/0
Sun Jan 05 18:29:34 2020 SYSTEM ADAPTER LIST
Sun Jan 05 18:29:34 2020 Realtek PCIe FE Family Controller
Sun Jan 05 18:29:34 2020   Index = 16
Sun Jan 05 18:29:34 2020   GUID = {BAD8E8E0-A4FA-4CBD-A40A-669DCCD044ED}
Sun Jan 05 18:29:34 2020   IP = 0.0.0.0/0.0.0.0 
Sun Jan 05 18:29:34 2020   MAC = 6c:2b:59:4b:0d:f6
Sun Jan 05 18:29:34 2020   GATEWAY = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV =  
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DNS SERV =  
Sun Jan 05 18:29:34 2020 Bluetooth Device (Personal Area Network)
Sun Jan 05 18:29:34 2020   Index = 7
Sun Jan 05 18:29:34 2020   GUID = {4768CC9E-24CC-4293-8712-5A560E0BE7EC}
Sun Jan 05 18:29:34 2020   IP = 0.0.0.0/0.0.0.0 
Sun Jan 05 18:29:34 2020   MAC = fc:77:74:cc:4b:ec
Sun Jan 05 18:29:34 2020   GATEWAY = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV =  
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DNS SERV =  
Sun Jan 05 18:29:34 2020 VMware Virtual Ethernet Adapter for VMnet1
Sun Jan 05 18:29:34 2020   Index = 12
Sun Jan 05 18:29:34 2020   GUID = {7659E513-211C-4ADE-B386-CAF9A936C236}
Sun Jan 05 18:29:34 2020   IP = 192.168.220.1/255.255.255.0 
Sun Jan 05 18:29:34 2020   MAC = 00:50:56:c0:00:02
Sun Jan 05 18:29:34 2020   GATEWAY = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV = 192.168.220.254/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:26:25 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 18:56:25 2020
Sun Jan 05 18:29:34 2020   DNS SERV =  
Sun Jan 05 18:29:34 2020 VMware Virtual Ethernet Adapter for VMnet8
Sun Jan 05 18:29:34 2020   Index = 22
Sun Jan 05 18:29:34 2020   GUID = {FBA75E1D-0C87-430C-8B6B-5B907B85286C}
Sun Jan 05 18:29:34 2020   IP = 192.168.199.1/255.255.255.0 
Sun Jan 05 18:29:34 2020   MAC = 00:50:56:c0:00:09
Sun Jan 05 18:29:34 2020   GATEWAY = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV = 192.168.199.254/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:26:29 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 18:56:29 2020
Sun Jan 05 18:29:34 2020   PRI WINS = 192.168.199.2/255.255.255.255 
Sun Jan 05 18:29:34 2020   SEC WINS =  
Sun Jan 05 18:29:34 2020   DNS SERV =  
Sun Jan 05 18:29:34 2020 TAP-Windows Adapter V9
Sun Jan 05 18:29:34 2020   Index = 17
Sun Jan 05 18:29:34 2020   GUID = {63456A0B-A368-49F1-A830-23CC88608ACE}
Sun Jan 05 18:29:34 2020   IP = 169.254.255.134/255.255.0.0 
Sun Jan 05 18:29:34 2020   MAC = 00:ff:63:45:6a:0c
Sun Jan 05 18:29:34 2020   GATEWAY = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DNS SERV =  
Sun Jan 05 18:29:34 2020 Intel(R) Dual Band Wireless-AC 3165
Sun Jan 05 18:29:34 2020   Index = 13
Sun Jan 05 18:29:34 2020   GUID = {8909B16D-66D7-4CF6-A656-2F7B9C9C1BC4}
Sun Jan 05 18:29:34 2020   IP = 192.168.43.60/255.255.255.0 
Sun Jan 05 18:29:34 2020   MAC = fc:77:74:cc:4b:e8
Sun Jan 05 18:29:34 2020   GATEWAY = 192.168.43.1/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV = 192.168.43.1/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:21:51 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 19:21:51 2020
Sun Jan 05 18:29:34 2020   DNS SERV = 8.8.8.8/255.255.255.255 
Sun Jan 05 18:29:34 2020 Microsoft Wi-Fi Direct Virtual Adapter
Sun Jan 05 18:29:34 2020   Index = 8
Sun Jan 05 18:29:34 2020   GUID = {5BDA4D46-8564-40A1-BE64-6EB33C7C61C2}
Sun Jan 05 18:29:34 2020   IP = 0.0.0.0/0.0.0.0 
Sun Jan 05 18:29:34 2020   MAC = fc:77:74:cc:4b:e9
Sun Jan 05 18:29:34 2020   GATEWAY = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV =  
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DNS SERV =  
Sun Jan 05 18:29:34 2020 Microsoft Wi-Fi Direct Virtual Adapter #2
Sun Jan 05 18:29:34 2020   Index = 11
Sun Jan 05 18:29:34 2020   GUID = {74D0884C-0FDA-4DF9-A8AF-476B3FC51984}
Sun Jan 05 18:29:34 2020   IP = 0.0.0.0/0.0.0.0 
Sun Jan 05 18:29:34 2020   MAC = fe:77:74:cc:4b:e8
Sun Jan 05 18:29:34 2020   GATEWAY = 0.0.0.0/255.255.255.255 
Sun Jan 05 18:29:34 2020   DHCP SERV =  
Sun Jan 05 18:29:34 2020   DHCP LEASE OBTAINED = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DHCP LEASE EXPIRES  = Sun Jan 05 18:29:34 2020
Sun Jan 05 18:29:34 2020   DNS SERV =  
Sun Jan 05 18:29:34 2020 Initialization Sequence Completed With Errors ( see http://openvpn.net/faq.html#dhcpclientserv )

SSH into an AWS EC2 instance running a VPN

$
0
0

I want to use a third-party VPN service on a Amazon AWS EC2 instance, and set up NordVPN with OpenVPN.

After following the top answer of this post: Route everything through VPN except SSH on Port 22

I'm still not able to SSH into the instance after activating the VPN. Does the fact that the Ubuntu machine is running on EC2 require me to do anything else?

Viewing all 825 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>