OpenVPN does not allow connection via GitHub macOS runner

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
edwardpbn
OpenVpn Newbie
Posts: 1
Joined: Sat Oct 15, 2022 3:56 am

OpenVPN does not allow connection via GitHub macOS runner

Post by edwardpbn » Sun Oct 16, 2022 11:21 pm

Hi friend,
Thank you so much for read this
The problem I am getting is that I can not connect via OpenVPN from GitHub macOS runner using a workflow. I use the same configuration that I use in my computer an that currently works there and that I describe bellow, but when I try to connect to my target domain I am getting 403 instead of 200 as in my computer
What can I do to fix it?
I would really appreciate getting a prompt response from you.

Workflow
-----------
name: Automation
on:
workflow_dispatch:
inputs:
run_automation:
description: "Select if you want automation test"
required: true
default: "true"
paths:
- "Gemfile"
- "fastlane/**"
- "**/*.sh"
- "**/*.yml"
jobs:
#########################
# UI Test
#########################
diagnostics:
runs-on: macos-11
steps:
- name: Checkout the code
uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v3.3.0
with:
distribution: 'adopt'
java-version: 11
- name: Install OpenVPN
run: |
sh scripts/open.sh
- name: Kill VPN connection
if: always()
run: |
sudo killall openvpn


.github/vpn/secret.txt
----------------------
username
password


scripts/open.sh
---------------
set -e
brew install openvpn
sudo openvpn --config ".github/vpn/client.ovpn" --auth-user-pass ".github/vpn/secret.txt" --daemon
sudo curl --insecure -so /dev/null -w ''%{http_code}'' https://mytargetdomain.com
sudo curl --insecure -so /dev/null -w ''%{http_code}'' https://www.youtube.com

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: OpenVPN does not allow connection via GitHub macOS runner

Post by openvpn_inc » Mon Oct 24, 2022 11:26 am

Hello edwardpbn,

I'm sorry you didn't get any responses yet. I think the problem here is not so much an OpenVPN problem but something to do with access to the website. An HTTP error 200 code means everything went okay. An HTTP error 403 code means access denied. OpenVPN has absolutely nothing to do with the HTTP protocol. It cannot cause this. However, if the traffic is going through a VPN tunnel and it reaches the HTTP server from another public IP, and the webserver doesn't like that public IP, maybe that's why you get an access denied.

To be honest, I do not know, and I cannot know, because I do not know anything about the webserver and what access controls it has. So I suggest you figure out why you get a 403 error from the web server first.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply