Install Proxmox System
Enter the USB system (on my computer, press F8 to enter, different brands of computers have different methods)
Select Install Proxmox VE (Graphical)
Installation Process
1.Click “I agree” at the bottom right
2.Select a disk to install the system and click Next
3.Choose the region and click Next
4.Set the password and email; the password set here is for both the server’s password-less login and Proxmox service’s password-less login
5.Select the network; here I didn’t plug in an Ethernet cable and directly used the wireless network card, click Next
Note: When configuring using the wireless network card directly, the IP address can be filled arbitrarily; it will need to be adjusted later
6.Confirm the configuration information and click Install
7.Wait for the installation to complete
8.After the installation is complete, the system will automatically reboot, select to enter the first Proxmox VE GNU/Linux
9.Enter the account password you set to access the system
10.You can see that the web address is displayed at the top: https://192.168.100.2:8006
If using a LAN cable, it can be accessed, but since we are not using a LAN cable and are directly using Wi-Fi, this address cannot be accessed. Below, we will continue to configure the Wi-Fi.
Install WPA Service
1.Download the installation package
2.Drag the installation package into the USB drive
3.Insert the USB drive into the Proxmox server/computer that needs to be installed
4.Use `fdisk -l` to check the inserted USB drive
5.Mount the USB drive to the server’s `/mnt` directory using `mount -i /dev/sdb2 /mnt`
6.Copy the installation package from the `/mnt` directory to the server
cp -r /mnt/wpa ~
7.Enter the `wpa` directory
cd ~/wpa
8.Install the wpasupplicant package (some packages may fail to install, but this does not affect the final use of wpasupplicant)
dpkg -i *.deb
Configure Wi-Fi
You can view all network card information using `ip a`
root@pve:”/wpaf ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1866
link/loopback eo:oe:ee:ee:ee:eo brd eo:eo:ee:eo:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: enp4sO: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 10ee
link/ether a0:36:bc:09:19:20 brd ff:ff:ff:ff:ff:ff
3: wlxec6073a623a4: <BROADCAST,MULTICAST> mtu 1509 qdisc noop state DOWN group default qlen 1000
link/ether ec:60:73:a6:23:a4 brd ff:ff:ff:ff:ff:ff
4: vmbre: <BROADCAST, MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOMN group default qien 1090
link/ether 3e:2c:e5:fd:aa:c3 brd ff:ff:ff:ff:ff:ff
inet 192.168.100.2/24 scope global vmbro
valid_lft forever preferred_lft forever
inet6 feBe::3c2c:e5ff:fefd:aac3/64 scope link
valid_lft forever preferred_lft forever
`wlxec6073a623a4` is the wireless network card, typically prefixed with `wl`
Generate Wi-Fi configuration file
wpa_passphrase WiFi_name WiFi_password >> /etc/wpa.conf
View the result
network={
ssid=”WiFi_name”
scan_ssid=1 # allows scanning of hidden WiFi
#psk=”WiFi_password”
priority=1 # priority
psk=XXXXXX
}
Modify the configuration file `/etc/network/interfaces`
auto lo
iface lo inet loopback
auto vmbro
iface vmbro inet static
address 192.168.100.2/24
bridge-ports none
bridge-stp off
bridge-fd o
auto wlxec6073a623a4
iface wlxec6073a623a4 inet dhcp
wpa-conf /etc/wpa.conf
source /etc/network/interfaces.d/*
Reboot to make the Wi-Fi configuration take effect
reboot
Execute the command to check if the wireless network card is available, if it returns OK, it means you can scan Wi-Fi networks
wpa_cli -i wlxec6073a623a4
OK
wpa_cli -i wlp2s0 scan # Scan for nearby Wi-Fi networks
wpa_cli -i wlp2s0 scan_result # Display the scanned Wi-Fi networks
wpa_cli -i wlp2s0 status # Current WPA/EAPOL/EAP communication status
Use `ip a` to check if the wireless network card has obtained an IP
root@pve:^#ip a
1: 10: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback ee:ee:ee:ee:ee:00 brd ee:0:00:00:09:00
inet 127.0.0.1/8 scope host 10
valid_lft forever preferred_Ift forever inet6 ::1/128 scope host noprefixroute valid_lft forever preferred_lft forever
2: enp4s0: <BRDADCAST,MULTICAST> mtu 150e adisc noop state DOWN group default glen 1000
link/ether a0:36:bc:09:19:20 brd ff:ff:ff:ff:ff:ff
3: wlxec6073a623a4: <BRDADCAST,MULTICAST:UF,LONER_UP, mtu 1500 adisc noqueue state UP group default glen 1900
link/ether ec:60:73:a6:23:a4 brd. ff:ff:fF:ff:Ff:ff
inet 192.168.1.133/24 brd 192.168.1.255 scope global dynamic wlxec6e73a623a4
valid_1ft 7105sec prefenred_lft 7105sec
inet6 fe60::ee60: 734f:fea6:23a4/64 scope link
valid 1ft forever prefenred_1ft forever
4: wmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1509 adisc noqueue state UNKNOWN group default qlen 10ee
Link/ether 5a:ef366:CBs41:7d brd ff:ff;ff:ff:ff:f7
inet 192.168.100.2/24 scope slobal vmbre valid Ift forever prefenned_ift forever
inet6 fe6e::5Bef:66ff;fecB:417a/64 scope Link valid_ift fonever prefenred_1ft forever
You can see the wireless network card’s IP address as `192.168.1.133`, indicating the network is now accessible.
Verification
Ping external and internal IP addresses to verify the network connection
PING uuu.a.shifen.com (110.242.68.3) 56(84) bytes of data.
64 bytes from 110.242.68.3(110.242.68.3): icmp_seq=1 ttl=53 time=110 ms
64 bytes from 110.242.68.3(110.242.68.3): 1cmp_seq=2 ttl=53 time=29.2 ms
64 bytes from 110.242.68.3 (110.242.68.3): icmp_seg=a ttl=53 time=53.6 ms
64 bytes from 11e.242.68.3(110.242.68.3): icmp_seg=4 ttl=53 time=74.6 ms
64 bytes from 110.242.68.3 (110.242.68.3): icmp_seg=5 ttl=53 time=120 ms
— wuw.a.shifen.com ping statistics –
3 packets transmitted, 3 received, o% packet loss, time 4007ms
rtt min/avg/max/ mdev = 29.175/77.505/120.356/34.026 ms
This test proves the network configuration is successful.
Commands Supplement:
Enable Wi-Fi using `ifup wlxec6073a623a4`
Disable Wi-Fi using `ifdown wlxec6073a623a4`
Check wireless network card process using `ps -ef|grep wpa`
Access Proxmox via IP
Use `ip a` to find the IP address of the Proxmox host machine.
You may get a warning about an insecure connection; click “Continue to this website.”
Username and password are the same as the server login credentials.
You may be prompted that no valid subscription is found; simply click “OK.”
Creating a Server
1.Enter the “Template” section.
2.Select the template you want to download (for example, choose an Ubuntu system template to download).
3.Click “Download,” and detailed information will be shown.
4.You can also check the download progress by navigating to the server directory:
`/var/lib/vz/template/cache`. Alternatively, you can wait on the current page to see the download progress.
If the network is slow, you can manually download the file (the download URL is shown in the image below) and place it in the directory above. The page will automatically refresh, and the template will load.
Once the download is complete, you will see the template listed.
5.Click “Create CT” at the top right.
CT vs VM in Proxmox:
In Proxmox, CT and VM are two different concepts. CT uses LXC technology and relies on kernel-level virtualization, offering better performance and security. In contrast, VM uses hardware virtualization, allowing different operating systems to run on it.
Configuring the Server
1.Set the hostname and password, then click “Next.”
2.Select the template, i.e., the installed system.
3.Set disk space.
4.Set CPU configuration.
5.Set memory configuration.
6.Set network configuration (you can assign any IP address; it will be adjusted later in Proxmox).
7.Set DNS (you can either configure it or use the default host configuration).
8.Click “Finish.”
9.Once the server creation is complete, you will see a “TASK OK” message.
10.Click “Start” to power on the newly created server.
11.Log into the server via Proxmox with the username and password.
12.Use `ip a` to verify the IP address you just configured.
At this point, the server may not have network connectivity.
Example:
ping 110.242.68.3
PING 110.242.68.3 (110.242.68.3) 56(84) bytes of data.
From 10.0.0.2 icmp_seq=1 Destination Host Unreachable
From 10.0.0.2 icmp_seq=2 Destination Host Unreachable
Configuring Network for the Server
Modify the network configuration file `/etc/network/interfaces`:
auto lo
iface lo inet loopback
auto enp4s0
iface enp4s0 inet dhcp
auto wlxec6073a623a4
iface wlxec6073a623a4 inet dhcp
wpa-conf /etc/wpa.conf
gateway 192.168.1.1
auto vmbr0
iface vmbr0 inet static
address 10.0.0.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
# Remember to change the network card name ‘wlxec6073a623a4’ to your own wireless network card name
post-up iptables -t nat -A POSTROUTING -s ‘10.0.0.0/24’ -o wlxec6073a623a4 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s ‘10.0.0.0/24’ -o wlxec6073a623a4 -j MASQUERADE
#iface enp4s0 inet manual
#auto wlxec6073a623a4
#iface wlxec6073a623a4 inet dhcp
# wpa-conf /etc/wpa.conf
source /etc/network/interfaces.d/*
Reboot the server:
reboot
After reboot, you can access the system via [https://192.168.1.133:8006/](https://192.168.1.133:8006/).
Run the `ping` command again, and now you should have internet access.
Example:
root@test-ubuntu:~# ping www.baidu.com
PING www.a.shifen.com (110.242.68.4) 56(84) bytes of data.
64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=1 ttl=52 time=23.8 ms
64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=2 ttl=52 time=116 ms
64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=3 ttl=52 time=37.8 ms
64 bytes from 110.242.68.4 (110.242.68.4): icmp_seq=4 ttl=52 time=166 ms
Virtual Machine Connection Methods
Since the virtual machine network segment created via the Wi-Fi network is not in the same subnet, we need to solve the issue of connecting the virtual machine network.
Method 1: Connect to the virtual machine via OpenVPN
Method 2: Directly connect to the virtual machine through port forwarding
Access via port forwarding
Create the file `/root/iptablesNat.sh`
#!/usr/bin/env bash
# The purpose of this line is to forward traffic accessed via port 12222 through the network card wlp7s0 to port 22 of the IP 10.10.10.3
# So when we connect using ssh -p 12222 root@192.168.31.252, we will be connected to the Ubuntu virtual machine
# -i Be sure to change to your own wireless network card name
iptables -t nat -A PREROUTING -i wlxec6073a623a4 -p tcp –dport 51022 -j DNAT –to 10.0.0.2:22
# To forward more ports, just add more forwarding commands, e.g., 192.168.31.252:6666 -> 10.10.10.3:178
# iptables -t nat -A PREROUTING -i wlp7s0 -p tcp –dport 51022 -j DNAT –to 10.0.0.2:3306
Change permissions to make the script executable:
chmod +x iptablesNat.sh
Modify `/etc/network/interfaces`
auto lo
iface lo inet loopback
auto enp4s0
iface enp4s0 inet dhcp
auto wlxec6073a623a4
iface wlxec6073a623a4 inet dhcp
wpa-conf /etc/wpa.conf
gateway 192.168.1.1
auto vmbr0
iface vmbr0 inet static
address 10.0.0.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up bash /root/iptablesNat.sh
post-up iptables -t nat -A POSTROUTING -s ‘10.0.0.0/24’ -o wlxec6073a623a4 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s ‘10.0.0.0/24’ -o wlxec6073a623a4 -j MASQUERADE
source /etc/network/interfaces.d/*
Restart the network:
systemctl restart networking
Test connectivity
If the network is not working, restart the virtual machine (note: not Proxmox itself).
tcping 192.168.1.133 51022
192.168.1.133 port 51022 open.
Configure Ubuntu Server to Allow Remote Root Login
Edit the SSH configuration file:
nano /etc/ssh/sshd_config
Change `PermitRootLogin` to `yes`:
PermitRootLogin yes
Restart the SSH service:
systemctl restart ssh
Now you can connect to the server via the forwarded port.
You can also create a Windows server in Proxmox, and their internal network will be able to communicate without this complicated setup.
PS: You can also build your own VPN to bridge the network.
Add Hard Drive
My machine has two hard drives, but only one was mounted to Proxmox by default during installation.
Click on the disk to see the disks on the server.
Disks starting with `/dev/sd` are unmounted disks.
To erase the disk:
Create a Volume Group.
Select the disk and enter a name.
Once the volume group is created, you will see the available space as shown below.
When creating a virtual machine, you can now choose the disk you just created.
Afterward, you can create the virtual machine.
Leave a Reply