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 ?
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 ?