Compare commits
15 commits
d314683996
...
4ae04fd8dc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4ae04fd8dc | ||
![]() |
c8bf504bef | ||
![]() |
49869e7e88 | ||
![]() |
81f00acc57 | ||
![]() |
6cfb842f79 | ||
![]() |
2b0de3341c | ||
![]() |
84cb274966 | ||
![]() |
ddb777d5ed | ||
![]() |
6652eadd84 | ||
![]() |
c753d44e7b | ||
![]() |
2b5085e9c1 | ||
![]() |
22ff376dd9 | ||
![]() |
c6a614276f | ||
![]() |
2d862f8b4b | ||
![]() |
83c474b59d |
|
@ -6,10 +6,12 @@ xmr: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAU
|
|||
tags:
|
||||
- Core Tutorial
|
||||
---
|
||||
# Acquiring remote servers anonymously (non-KYC providers)
|
||||
# Renting Remote VPS Servers Anonymously (non-KYC cloud resellers)
|
||||
|
||||

|
||||
|
||||
In this tutorial we're going to cover how you can rent remote servers while maintaining your anonymity from the initial payment to the actual use of the server.
|
||||
|
||||

|
||||
|
||||
## **Finding out a non-KYC Cloud Provider and Email Provider**
|
||||
|
|
BIN
everyoneisacriminal/applearticle.png
Normal file
After Width: | Height: | Size: 273 KiB |
BIN
everyoneisacriminal/dumblawsarticle.png
Normal file
After Width: | Height: | Size: 70 KiB |
BIN
everyoneisacriminal/eufarmsarticle.png
Normal file
After Width: | Height: | Size: 164 KiB |
BIN
everyoneisacriminal/immigrationarticle.png
Normal file
After Width: | Height: | Size: 16 KiB |
142
everyoneisacriminal/index.md
Normal file
|
@ -0,0 +1,142 @@
|
|||
---
|
||||
author: Crabmeat
|
||||
date: 2025-06-07
|
||||
gitea_url: "http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-contributions/issues/345"
|
||||
xmr: 89aWkJ8yabjWTDYcHYhS3ZCrNZiwurptzRZsEpuBLFpJgUfAK2aj74CPDSNZDRnRqeKNGTgrsi9LwGJiaQBQP4Yg5YtJw2U
|
||||
---
|
||||
# **Everyone is a criminal**
|
||||
|
||||
## **Do you know the law?**
|
||||
|
||||
Unless it's your job, and even then, I assume you still won't, you can't know the law perfectly. There's always something you might overlook, and that can be used against you. For example, if we look at U.S. federal laws, there are more than 20,000 statutes in the U.S. Code, not including the thousands of federal regulations. Similarly, in the European Union, there are over 20,000 legal acts, and on top of that, you have to consider the laws of each country within the EU.
|
||||
|
||||
Which leads us to a few questions: Who needs so many laws just to live? Who can possibly know all of them? And how can anyone avoid being a criminal when every one of these laws must be followed?
|
||||
|
||||
You know what? You can't use the excuse that there are too many laws to protect yourself, because the law says you're required to know the law.
|
||||
|
||||
Each year, more than 300 new laws are passed in the USA. In the European Union, at least 100 laws are passed annually. It would take more than a full-time job to analyze and understand each of these laws in order to truly 'know the law'.
|
||||
|
||||
Here is an example of how much laws number can explode when a specific topic is focused:
|
||||
|
||||
Global Environmental Regulation and Legislation Over Time (Wordwide)
|
||||
|
||||

|
||||
|
||||
Just so you know, here is an example of how it is impossible to know the law:
|
||||
|
||||

|
||||
|
||||
If you are interested in this topic and if you want to discuss about it, there is this [reddit](https://www.reddit.com/r/AskSocialScience/comments/1ha44y/how_are_people_supposed_to_know_the_law/?rdt=34232) thread that you could be interested in.
|
||||
|
||||
*Interesting reading: “The Death of Common Sense: How Law Is Suffocating America” by Philip K. Howard. In this book, Howard explores how the increasing complexity of laws and regulations has made society harder to navigate. He argues that the law has become so bloated that even lawyers and lawmakers cannot keep up with it.*
|
||||
|
||||
## **Some real life examples**
|
||||
|
||||
To illustrate the point above, I'd like to share some of the most absurd laws that can turn ordinary people into criminals.
|
||||
|
||||
Stupid but quite funny ones:
|
||||
|
||||
- In Georgia (U.S.A.), it’s illegal to eat fried chicken with a fork. This law is still technically in effect, and if a government official ever decided to make your life harder, they could use it against you.
|
||||
|
||||
- In Japan, it’s illegal to dance after midnight. This law was introduced in the 1940s to regulate behavior in nightclubs. Although it was relaxed in 2015, it’s still technically illegal to dance after midnight in some areas, meaning someone could find themselves in trouble just for dancing.
|
||||
|
||||
- In Switzerland, it’s illegal to flush the toilet after 10 p.m. in an apartment building. Imagine a law that prevents you from living in basic, healthy conditions.
|
||||
|
||||
- In Oklahoma (U.S.A.), it’s illegal to make faces at dogs. Essentially, you could be reported by a neighbor while playing with your dog and be charged for it.
|
||||
|
||||
- In the UK, it’s illegal to handle a salmon in suspicious circumstances. Someone could unknowingly get into trouble if they’re seen handling a salmon in a way that seems “suspicious” to authorities. And what exactly counts as "suspicious"? No one really knows.
|
||||
|
||||
- In Australia, it’s illegal to walk on the right side of the sidewalk. In many places, pedestrians just walk on whichever side is most convenient. But in some parts of Australia, you’re legally required to walk on the left side. So, if you happen to walk on the right side, you could technically be breaking the law.
|
||||
|
||||
Stupid but we should be worried about ones as it put people in trouble:
|
||||
|
||||
- In Michigan (USA), a 10-year-old child was charged with criminal aggravated assault after throwing a ball in another kid’s face during a dodgeball game, injuring him. Although the charges were eventually dropped, it's still a troubling situation.
|
||||
|
||||
- In North Carolina (USA), a woman was charged with a misdemeanor for practicing or attempting veterinary medicine without a license because she was trying to save animals from a hurricane by sheltering them.
|
||||
|
||||
- In Denver (USA), a bar manager was jailed for three days for infusing vodka and selling it as a cocktail. In Denver, infusing vodka and selling it is a crime. To be clear, no one was harmed by the vodka, but a competitor who lacked the same level of creativity filed a complaint, and the sentence was handed down to appease him.
|
||||
|
||||
- In Kentucky (USA), a man was charged for giving away free eyeglasses to people who couldn’t afford them. It was prohibited because he didn’t follow the rules set by the established eyeglasses business.
|
||||
|
||||
Most of these laws are outdated and should have been repealed a long time ago. So, we can logically ask: why are these laws still in effect? Is it really that difficult to abolish a law? I don't think so, especially when it seems easy to vote in thousands of new laws each year. Perhaps governments keep these laws on the books in order to use them against people when needed. Maybe these laws aren’t repealed because they serve to maintain control over the population—ensuring that anyone can be turned into a criminal when necessary.
|
||||
|
||||
This [article](https://uclawreview.org/2021/12/10/ridiculous-laws-consequences-of-keeping-antiquated-and-unenforced-laws-on-the-books/) gives a great analysis of this situation and deserve to be read.
|
||||
|
||||
Here is the introduction of the article:
|
||||
|
||||

|
||||
|
||||
*Interesting reading: "Three Felonies a Day: How the Feds Target the Innocent" by Harvey Silverglate. Silverglate explains how the broad scope of U.S. federal laws enables the government to prosecute individuals for actions that may not seem criminal at all. He argues that the average American unknowingly commits several felonies a day, simply because laws are so expansive.*
|
||||
|
||||
## Laws popularity
|
||||
|
||||
Another strange effect of laws is that they are subject to a popularity cycle, which influences how much attention they receive from governments. This is a clear indication that laws are not a constant truth and can be manipulated by governments whenever they see fit.
|
||||
|
||||
Here are a few examples of how the popularity of laws has led to major situations:
|
||||
|
||||
**In this examples we will look at context, popularity circles and manipulation examples*
|
||||
|
||||
1) The War on Drugs (U.S.A)
|
||||
|
||||
Context: From the 1980s through the 2000s, the U.S. government focused on the drug market, known as the "War on Drugs." Media and political campaigns fueled public fear of drug use, and the government leveraged this fear to enact stricter laws, including mandatory minimum sentences for drug offenses.
|
||||
|
||||
Popularity Cycle: During periods of rising public concern about drug use, the law became more prominent, and the U.S. government took action to demonstrate that they were in control of the situation. Later, as public opinion shifted toward criminal justice reform and the legalization of marijuana—largely driven by the media's changing focus—many of these laws were reworked and weakened.
|
||||
|
||||
Example of Manipulation: During this period, political leaders exploited public fear to emphasize certain drug laws in order to gain favor with voters. What started as a public security concern evolved into a powerful tool for securing political support.
|
||||
|
||||
If you want more detailed information about this topic, you can read the following [article](https://www.britannica.com/topic/war-on-drugs).
|
||||
|
||||
Here is an extract of the article:
|
||||
|
||||

|
||||
|
||||
2) Immigration Laws (Various Countries)
|
||||
|
||||
Context: The political climate and public opinion lead to major changes in immigration laws. For example, during periods of economic hardship, governments may pass immigration laws that limit the influx of foreign workers. In contrast, during times of labor shortages, restrictions are eased to attract more foreign workers.
|
||||
|
||||
Popularity Cycle: Public fears about immigration and national security, often fueled by media coverage, lead to tougher laws. However, when economic and humanitarian concerns arise, governments may weaken these laws to maintain public support.
|
||||
|
||||
Example of Manipulation: Governments may create or shift immigration policies based on political agendas or popular sentiment to maintain or gain support from certain voter bases.
|
||||
|
||||
The following [article](https://www.reuters.com/practical-law-the-journal/transactional/us-immigration-law-evolution-current-issues-2025-05-01/) covers major changes in immigration laws in US, based on centext.
|
||||
|
||||
Here is a quote from this article:
|
||||
|
||||

|
||||
|
||||
*Interesting reading: "The Authoritarian Dynamic" by Karen Stenner. This book analyzes how fear and anxiety, particularly regarding out-groups (such as immigrants or racial minorities), influence public opinion and, in turn, shape political behavior. Stenner connects these dynamics to the manipulation of laws and political policies.*
|
||||
|
||||
## When law serves power
|
||||
|
||||
Worldwide, most large companies have a vested interest in which laws are passed. Since they pay taxes in their respective countries, governments tend to enact laws that benefit these companies. The more taxes a company pays, the more the government will try to help them generate more revenue to increase tax contributions.
|
||||
|
||||
When direct corruption is involved, some companies can eliminate their competition simply by pushing governments to pass specific laws that benefit them.
|
||||
|
||||
In contrast, small businesses and individuals have little to no influence on laws and must simply endure them. Many small businesses have disappeared over time due to laws that made it impossible for them to turn a profit.
|
||||
|
||||
Taking the European example, many small farmers have been forced to cease their activities over the past decades, as European regulations tend to favor large farms. These regulations are often too burdensome for small farmers to handle, leaving them in a position where they are unable to operate legally and cannot sell their products across Europe. Between 2005 and 2016, more than 3 million farms disappeared across the EU. According to Eurostat data, the number of farms in the EU has decreased by about 30% over the past 20 years, while the size of the average farm has increased significantly.
|
||||
|
||||
Can you imagine that governments are passing laws that affect the people who feed the population? That's exactly what they're doing, with the sole aim of supporting large companies.
|
||||
|
||||
As small farms disappear, rural areas are experiencing economic decline. In these areas, farming is not just an economic activity but a way of life, and its collapse leads to the creation of "ghost towns." In some countries, entire villages are up for sale, as people are forced to move to other regions in search of work, all due to the disappearance of small farms.
|
||||
|
||||
You can find [here](https://www.arc2020.eu/op-ed-time-for-a-rethink-to-reverse-the-rapid-decline-of-farming-in-europe/) an article that is describing this issue and that invite to rethink the system.
|
||||
|
||||
I hope this article piques your interest:
|
||||
|
||||

|
||||
|
||||
On another note, some large companies, like Apple, do not have to pay taxes in Ireland, while smaller businesses are required to. The Irish government argues that this policy was implemented to create jobs in Cork. However, even though it has led to job creation, individuals and small businesses are left to bear the cost of what Apple doesn't pay.
|
||||
|
||||
One might think that the Irish government has no interest in allowing such large companies to avoid paying taxes. However, at the end of the day, it’s all about tax competition. By offering lower taxes and attracting big companies, Ireland remains economically competitive. Additionally, politicians gain support from the public and investors by drawing high-profile companies that can boost the economy and generate media attention. In making these decisions, the impact on small businesses and individuals is often overlooked.
|
||||
|
||||
This [article](https://applescoop.org/story/how-does-apple-avoid-paying-billions-in-taxes-inside-irelands-secret-deal) describe Apple's strategy in Ireland.
|
||||
|
||||

|
||||
|
||||
*Interesting reading: "The Corporate Tax Avoidance Trap" by Richard Murphy. This book delves into corporate tax avoidance and the mechanisms that large companies use to avoid taxes, such as shifting profits to low-tax jurisdictions like Ireland. Richard Murphy offers insights into how these practices affect both national economies and smaller businesses, urging for reform to close the loopholes that benefit big corporations.*
|
||||
|
||||
## Conclusion
|
||||
|
||||
When it comes to laws, everyone is a criminal. No one knows the law perfectly, and some downright absurd laws still exist. Laws are enforced selectively by governments, and big companies hold significant influence over them. It’s almost impossible for any individual who wants to respect the law to do so fully. Laws are created to serve the interests of governments and large corporations, while controlling small businesses and individuals.
|
||||
|
BIN
everyoneisacriminal/lawsevolution.png
Normal file
After Width: | Height: | Size: 96 KiB |
BIN
everyoneisacriminal/lawslengh.png
Normal file
After Width: | Height: | Size: 62 KiB |
BIN
everyoneisacriminal/warondrugsarticle.png
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
vpsvpnrouting/image-1.png
Normal file
After Width: | Height: | Size: 11 KiB |
BIN
vpsvpnrouting/image-2.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
vpsvpnrouting/image-3.png
Normal file
After Width: | Height: | Size: 203 KiB |
BIN
vpsvpnrouting/image.png
Normal file
After Width: | Height: | Size: 113 KiB |
368
vpsvpnrouting/index.md
Normal file
|
@ -0,0 +1,368 @@
|
|||
---
|
||||
author: Anticonformist
|
||||
date: 2025-01-31
|
||||
gitea_url: "http://git.nowherejezfoltodf4jiyl6r56jnzintap5vyjlia7fkirfsnfizflqd.onion/nihilist/blog-contributions/issues/320"
|
||||
xmr: 8AUYjhQeG3D5aodJDtqG499N5jXXM71gYKD8LgSsFB9BUV1o7muLv3DXHoydRTK4SZaaUBq4EAUqpZHLrX2VZLH71Jrd9k8
|
||||
---
|
||||
|
||||
# Using a VPS to route the traffic to a Self-hosted service (hiding your home public IP from the users)
|
||||
|
||||
## Why is this setup important ?
|
||||
|
||||
Suppose you have a server at home and you have a nginx service on it:
|
||||
|
||||

|
||||
|
||||
If you intend that local webserver to be a public clearnet service, normally you'd need to port-forward it via your home router to be able to allow remote users to reach it.
|
||||
|
||||
|
||||
## What do we need for this setup ?
|
||||
|
||||
You're going to need the following:
|
||||
- [a home server with a local webserver running](../hypervisor_selfhosted/index.md)
|
||||
- [A remote server (VPS)](../anonymousremoteserver/index.md)
|
||||
- [a clearnet domain](../anondomain/index.md)
|
||||
|
||||
We recommend using [Monero](../monerowallet/index.md) to pay for your remote servers and domains, to support the [Monero Circular Economy](../monerofirst/index.md) as much as possible.
|
||||
|
||||
## Targeted Setup
|
||||
|
||||
The setup we are targeting is the following:
|
||||
|
||||

|
||||
|
||||
We're going to connect the homeserver to the remote VPS via OpenVPN, and we're going to make it so that the remote VPS's nginx is configured to make sure that we can reach our local nginx webserver with it.
|
||||
|
||||
## Serverside Remote Setup : Openvpn server
|
||||
|
||||
First we log on the VPS, to install the openvpn server using agristan's openvpn install script:
|
||||
```sh
|
||||
root@remoteserver ~ # curl -O https://raw.githubusercontent.com/angristan/openvpn-install/master/openvpn-install.sh
|
||||
root@remoteserver ~ # chmod +x openvpn-install.sh
|
||||
|
||||
root@remoteserver ~ # ./openvpn-install.sh
|
||||
Welcome to the OpenVPN installer!
|
||||
The git repository is available at: https://github.com/angristan/openvpn-install
|
||||
|
||||
I need to ask you a few questions before starting the setup.
|
||||
You can leave the default options and just press enter if you are okay with them.
|
||||
|
||||
I need to know the IPv4 address of the network interface you want OpenVPN listening to.
|
||||
Unless your server is behind NAT, it should be your public IPv4 address.
|
||||
IP address: 65.199.39.253
|
||||
|
||||
Checking for IPv6 connectivity...
|
||||
```
|
||||
|
||||
```sh
|
||||
Do you want to enable IPv6 support (NAT)? [y/n]: n
|
||||
|
||||
What port do you want OpenVPN to listen to?
|
||||
1) Default: 1194
|
||||
2) Custom
|
||||
3) Random [49152-65535]
|
||||
Port choice [1-3]: 1
|
||||
|
||||
What protocol do you want OpenVPN to use?
|
||||
UDP is faster. Unless it is not available, you shouldn't use TCP.
|
||||
1) UDP
|
||||
2) TCP
|
||||
Protocol [1-2]: 1
|
||||
|
||||
What DNS resolvers do you want to use with the VPN?
|
||||
1) Current system resolvers (from /etc/resolv.conf)
|
||||
2) Self-hosted DNS Resolver (Unbound)
|
||||
3) Cloudflare (Anycast: worldwide)
|
||||
4) Quad9 (Anycast: worldwide)
|
||||
5) Quad9 uncensored (Anycast: worldwide)
|
||||
6) FDN (France)
|
||||
7) DNS.WATCH (Germany)
|
||||
8) OpenDNS (Anycast: worldwide)
|
||||
9) Google (Anycast: worldwide)
|
||||
10) Yandex Basic (Russia)
|
||||
11) AdGuard DNS (Anycast: worldwide)
|
||||
12) NextDNS (Anycast: worldwide)
|
||||
13) Custom
|
||||
DNS [1-12]: 11
|
||||
|
||||
Do you want to use compression? It is not recommended since the VORACLE attack makes use of it.
|
||||
Enable compression? [y/n]: n
|
||||
|
||||
Do you want to customize encryption settings?
|
||||
Unless you know what you're doing, you should stick with the default parameters provided by the script.
|
||||
Note that whatever you choose, all the choices presented in the script are safe (unlike OpenVPN's defaults).
|
||||
See https://github.com/angristan/openvpn-install#security-and-encryption to learn more.
|
||||
|
||||
Customize encryption settings? [y/n]: n
|
||||
|
||||
Okay, that was all I needed. We are ready to setup your OpenVPN server now.
|
||||
You will be able to generate a client at the end of the installation.
|
||||
Press any key to continue...
|
||||
```
|
||||
|
||||
Then let it install the openvpn server as intended, then we need to create the client in the openvpn server directly, where we mention that its for the selfhosted-privatevm client:
|
||||
|
||||
```sh
|
||||
Tell me a name for the client.
|
||||
The name must consist of alphanumeric character. It may also include an underscore or a dash.
|
||||
Client name: selfhosted-privatevm
|
||||
|
||||
Do you want to protect the configuration file with a password?
|
||||
(e.g. encrypt the private key with a password)
|
||||
1) Add a passwordless client
|
||||
2) Use a password for the client
|
||||
Select an option [1-2]: 1
|
||||
|
||||
```
|
||||
|
||||
From there the openvpn install script finished the serverside setup, and as we can see it created the openvpn client file for the privatevm in the root directory:
|
||||
|
||||
```sh
|
||||
root@remoteserver ~ # cat selfhosted-privatevm.ovpn
|
||||
client
|
||||
proto udp
|
||||
explicit-exit-notify
|
||||
remote 65.199.39.253 1194
|
||||
dev tun
|
||||
resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
remote-cert-tls server
|
||||
verify-x509-name server_vCg0SCcC1z7L5umn name
|
||||
auth SHA256
|
||||
auth-nocache
|
||||
cipher AES-128-GCM
|
||||
tls-client
|
||||
tls-version-min 1.2
|
||||
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
|
||||
ignore-unknown-option block-outside-dns
|
||||
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
|
||||
|
||||
|
||||
verb 3
|
||||
<ca>
|
||||
-----BEGIN CERTIFICATE-----
|
||||
[REDACTED]
|
||||
---END CERTIFICATE-----
|
||||
</ca>
|
||||
<cert>
|
||||
-----BEGIN CERTIFICATE-----
|
||||
[REDACTED]
|
||||
-----END CERTIFICATE-----
|
||||
</cert>
|
||||
<key>
|
||||
-----BEGIN PRIVATE KEY-----
|
||||
[REDACTED]
|
||||
-----END PRIVATE KEY-----
|
||||
</key>
|
||||
<tls-crypt>
|
||||
#
|
||||
# 2048 bit OpenVPN static key
|
||||
#
|
||||
-----BEGIN OpenVPN Static key V1-----
|
||||
[REDACTED]
|
||||
-----END OpenVPN Static key V1-----
|
||||
</tls-crypt>
|
||||
```
|
||||
|
||||
Before we go forward, i recommend to edit it to avoid redirecting all traffic from the client to the server, since it's only a matter of enabling remote accesses, rather than using the openvpn as an actual clientside VPN:
|
||||
|
||||
```sh
|
||||
root@remoteserver ~ # vim selfhosted-privatevm.ovpn
|
||||
root@remoteserver ~ # cat selfhosted-privatevm.ovpn
|
||||
|
||||
[...]
|
||||
|
||||
ignore-unknown-option block-outside-dns
|
||||
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
|
||||
|
||||
|
||||
### DONT REDIRECT ALL TRAFFIC VIA THE VPS ###
|
||||
pull-filter ignore "redirect-gateway"
|
||||
#############################################
|
||||
|
||||
verb 3
|
||||
|
||||
[...]
|
||||
|
||||
```
|
||||
|
||||
## Serverside Self-hosted PrivateVM Setup : OpenVPN client
|
||||
|
||||
Now that the openvpn server is setup properly we can log on the private vm that we [previously](../hypervisor_selfhosted/) setup on our homeserver:
|
||||
```sh
|
||||
user@clientside ~ $ ssh privatevm
|
||||
|
||||
Linux localhost 6.1.0-34-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.135-1 (2025-04-25) x86_64
|
||||
Welcome to Kicksecure (TM)!
|
||||
https://www.kicksecure.com
|
||||
|
||||
Kicksecure Copyright (C) 2012 - 2025 ENCRYPTED SUPPORT LLC
|
||||
Kicksecure is Freedom Software, and you are welcome to redistribute it under
|
||||
certain conditions; type "kicksecure-license" <enter> for details.
|
||||
Kicksecure is a compilation of software packages, each under its own copyright and
|
||||
license. The exact license terms for each program are described in the
|
||||
individual files in /usr/share/doc/*/copyright.
|
||||
|
||||
Kicksecure GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
|
||||
permitted by applicable law; for details type "kicksecure-disclaimer" <enter>.
|
||||
|
||||
Kicksecure is a derivative of Debian GNU/Linux.
|
||||
|
||||
Kicksecure is a research project.
|
||||
|
||||
default user account: user
|
||||
default password: No password required. (Passwordless login.)
|
||||
|
||||
Type: "kicksecure" <enter> for help.
|
||||
|
||||
user@privatevm_selfhosted:~% curl 127.0.0.1
|
||||
welcome to the privatevm web server!
|
||||
|
||||
user@privatevm_selfhosted:~%
|
||||
```
|
||||
|
||||
From there, we install openvpn and import the openvpn client file:
|
||||
|
||||
```sh
|
||||
user@privatevm_selfhosted:~% sudo apt install openvpn
|
||||
[sudo] password for user: ********************
|
||||
|
||||
user@privatevm_selfhosted:~% cat privatevm_selfhosted.ovpn
|
||||
client
|
||||
proto udp
|
||||
explicit-exit-notify
|
||||
remote 65.199.39.253 1194
|
||||
dev tun
|
||||
resolv-retry infinite
|
||||
nobind
|
||||
persist-key
|
||||
persist-tun
|
||||
remote-cert-tls server
|
||||
verify-x509-name server_vCg0SCcC1z7L5umn name
|
||||
auth SHA256
|
||||
auth-nocache
|
||||
cipher AES-128-GCM
|
||||
tls-client
|
||||
tls-version-min 1.2
|
||||
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
|
||||
ignore-unknown-option block-outside-dns
|
||||
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
|
||||
|
||||
### DONT REDIRECT ALL TRAFFIC VIA THE VPS ###
|
||||
pull-filter ignore "redirect-gateway"
|
||||
#############################################
|
||||
|
||||
verb 3
|
||||
<ca>
|
||||
```
|
||||
|
||||
From there, we can create the following systemd service to make sure that the openvpn service stays connected in the background:
|
||||
|
||||
```sh
|
||||
user@privatevm_selfhosted:~% sudo vim /etc/systemd/system/vpn.service
|
||||
user@privatevm_selfhosted:~% sudo cat /etc/systemd/system/vpn.service
|
||||
|
||||
[Unit]
|
||||
Description=VPN
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
ExecStart=/usr/sbin/openvpn /home/user/privatevm_selfhosted.ovpn
|
||||
ExecStop=kill -9 $(pidof openvpn)
|
||||
Restart=always
|
||||
|
||||
user@privatevm_selfhosted:~% sudo systemctl daemon-reload
|
||||
user@privatevm_selfhosted:~% sudo systemctl enable --now
|
||||
```
|
||||
|
||||
From there, you can check if the VPN connection was successful:
|
||||
|
||||
```sh
|
||||
user@privatevm_selfhosted:~% ip a
|
||||
|
||||
[...]
|
||||
|
||||
3: tun0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 500
|
||||
link/none
|
||||
inet 10.8.0.2/24 scope global tun0
|
||||
valid_lft forever preferred_lft forever
|
||||
inet6 fe80::71c7:e80c:740f:7db5/64 scope link stable-privacy
|
||||
valid_lft forever preferred_lft forever
|
||||
```
|
||||
|
||||
Here as you can see, the private VM has the 10.8.0.2 IP on the new tun0 interface that was created by openvpn, which indicates that it works as intended. Let's see if we can ping the remote server aswell via the VPN tunnel directly, via it's 10.8.0.1 IP:
|
||||
|
||||
```sh
|
||||
user@privatevm_selfhosted:~% ping 10.8.0.1
|
||||
PING 10.8.0.1 (10.8.0.1) 56(84) bytes of data.
|
||||
64 bytes from 10.8.0.1: icmp_seq=1 ttl=64 time=48.5 ms
|
||||
64 bytes from 10.8.0.1: icmp_seq=2 ttl=64 time=48.2 ms
|
||||
64 bytes from 10.8.0.1: icmp_seq=3 ttl=64 time=47.6 ms
|
||||
```
|
||||
|
||||
There you go! we just validated that both servers can now communicate with each other.
|
||||
|
||||
## Serverside Remote Setup : Nginx reverse proxy
|
||||
|
||||
You can also test from the remote server if you can access the openvpn client via it's 10.8.0.2 IP:
|
||||
```sh
|
||||
root@remoteserver ~ # curl 10.8.0.2
|
||||
welcome to the privatevm web server!
|
||||
```
|
||||
|
||||
Now that the connection between the 2 servers has been correctly established via openvpn, we'll setup nginx on the remote server and configure it to act like a reverse proxy to make sure that the self-hosted web service is accessible from the outside, without revealing your home public IP to the end users:
|
||||
|
||||
```sh
|
||||
root@remoteserver ~ # sudo apt install nginx -y
|
||||
root@remoteserver ~ # cd /etc/nginx
|
||||
root@remoteserver ~ # rm sites-*/default
|
||||
root@remoteserver ~ # vim /etc/nginx/sites-available/rproxy-selfhosted-privatevm.conf
|
||||
root@remoteserver ~ # cat /etc/nginx/sites-available/rproxy-selfhosted-privatevm.conf
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
|
||||
server_name test.yourdoma.in;
|
||||
|
||||
location / {
|
||||
proxy_pass http://10.8.0.2:80/;
|
||||
}
|
||||
}
|
||||
root@remoteserver ~ # ln -s /etc/nginx/sites-available/rproxy-selfhosted-privatevm.conf /etc/nginx/sites-enabled/
|
||||
root@remoteserver ~ # nginx -t
|
||||
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
|
||||
nginx: configuration file /etc/nginx/nginx.conf test is successful
|
||||
|
||||
root@remoteserver ~ # nginx -s reload
|
||||
```
|
||||
|
||||
## Testing from the Clientside
|
||||
|
||||
And now that the nginx service has been setup on the remote server to act like a reverse proxy, let's test if we can access the self-hosted web server as intended:
|
||||
|
||||
```sh
|
||||
user@privatevm_clientside:~% curl http://test.yourdoma.in:80
|
||||
welcome to the privatevm web server!
|
||||
|
||||
```
|
||||
|
||||

|
||||
|
||||
And that's it! Now to highlight why this setup is important, as an end user, when i try to see what the public IP of the service is, i can only see that it is this remote server:
|
||||
|
||||
```sh
|
||||
user@privatevm_clientside:~% ping test.nowhere.moe
|
||||
PING test.nowhere.moe (65.199.39.253) 56(84) bytes of data.
|
||||
64 bytes from test.nowhere.moe (65.199.39.253): icmp_seq=1 ttl=56 time=61.8 ms
|
||||
|
||||
```
|
||||
|
||||
This is ideal because that way you are hiding your home public IP from your end users as intended. Unlike how it would have been in case if you had port-forwarded your self-hosted services via your home router, which would've exposed your house public IP.
|
||||
|