Getting internet by relay

sophie2022

New Member
Jun 2, 2022
5
0
1
I am a Linux novice and I am trying to have an internet connection on my Linux machine (Proxmox) by connecting it to a machine containing the internet (create a relay).
I connected a Windows machine (where I have an internet connection) to a switch then I connected my Linux machine to the same switch.
On my network card (Windows: Ethernet1), I enabled sharing, my network configuration in dhcp
On my Linux I have my card in manual:

auto ens033
iface ens033 inet manual

Then in a terminal on Linux I did the following commands:

IFACE="Ethernet1"
iptables -t filter -A BEFORE -o ${IFACE} -j ACCEPT
iptables -t filter -A BEFORE -i ${IFACE} -j ACCEPT
echo 1 > /proc/sys/net/ipv4/ip_forward

iptables -t nat -F
iptables -t nat -X
iptables -t nat -Z
iptables -t nat -A POSTROUTING -o ${IFACE} -j MASQUERADE

After all this manipulation, I still have no connection. I don't know if there are other things to put in place?

I remind you that my goal is to transform my Windows machine into an internet relay for my Linux machine (on which it is impossible to connect directly to the Internet).

An idea ?
 
So the internet connection for the PC with proxmox on it looks like this:
Code:
<INTERNET> --- [direct connection] --- <windows pc> --- [some switch] --- <proxmox pc>
from what I see is that you PC doesn't have an ip address and needs one manual configured. How are you currently interacting with the computer?
 
Last edited:
My Windows connection is through dhcp server.

Are my commands corrects ? maybe I have missed some ones ?
 
May I ask why you don't just directly connect your PVE server to that router that is acting as your DHCP server too?
I only see benefits doing it that way in case it is possible.
 
Because in the university where we have dhcp server, they apply a filtering process. My Windows is registered so it can be connected directly to the dhcp but my proxmox machine not
 
If you are using the Windows internet connection sharing feature. Then the default network hopefully didn't change from 192.168.137.1/24

Your /etc/network/interfaces config look like this:

Code:
iface ens033 inet manual

auto vmbr0
iface vmbr0 inet static
    address 192.168.137.10/24
    gateway 192.168.137.1
    bridge-ports ens033
    bridge-stp off
    bridge-fd 0

You should then be able to connect to https://192.168.137.10:8006 to reach your Proxmox webGUI from your Windows PC.
 
  • Like
Reactions: gurubert

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!