<<Back Home

VPS / VPN manual

To put SSH key to PUTTY – Connection -> SSH -> Auth
-------------

To install OpenVPN to the server:
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
-------------

To transfer a file from the server to local machine:
scp -i C:\VPS\ssh-key.key user@xxx.xxx.xxx.xxx:/home/user/client.ovpn D:\DestinationDirectory\
-------------

On the VPS:
Enabling FireWall
ufw status verbose
ufw disable
ufw enable
ufw reload
/etc/ufw/ufw.conf
--------------

On the instance:
Virtual Cloud Networks -> Create VCN
IPv4 CIDR Block: 10.0.0.0/16
Subnets -> Create subnet
IPv4 CIDR Block: 10.0.0.0/24
Route Table -> Add Route Rules
Target Type = Internet Gateway
Destination CIDR Block = 0.0.0.0/0
Target Internet Gateway = Internet Gateway vcn-***
Security Lists -> Add Security List
Ingress Rules:

  1. Source Type = CIDR
    Source = 0.0.0.0/0
    IP Protocol = TCP
    Source Port Range = All
    Destination Port Range = 22
    Allows = TCP traffic for ports: 22 SSH Remote Login Protocol
  2. Source Type = CIDR
    Source = 0.0.0.0/0
    IP Protocol = ICMP
    Type = 8
    Allows = ICMP traffic for: 8 Echo
  3. Source Type = CIDR
    Source = 10.0.0.0/16
    IP Protocol = ICMP
    Type = 8
    Allows = ICMP traffic for: 8 Echo
  4. Source Type = CIDR
    Source = 10.0.1.0/24
    IP Protocol = All Protocols
    Allows = All traffic for all ports
Egress Rules:
        Destination Type = CIDR
        Destination CIDR = 0.0.0.0/0
        IP Protocol = All Protocols
        Allows = All traffic for all ports
--------------

On the instance:
Network security groups -> Edit
Security Rules
Direction = Ingress
Source Type = CIDR
Source CIDR = 0.0.0.0/0
IP Protocol = All Protocols
Source Port Range, Destination Port Range = All
---------------

In the client *.ovpn:
dhcp-option DNS 8.8.8.8