Cannot do Port Forward on NAT and Wifi

Michele13

New Member
Sep 24, 2024
1
0
1
Hello.

I'm trying to setup proxmox on my laptop so I can test it. I've managed to connect it to Wifi with static IP address and get NAT working but I can't get port forwarding to work:

I have a CT running Debian with apache2 attached to vmbr1. I can reach it using its internal IP address 10.0.3.2 but not using the forwarded port from the host: 192.168.1.100:7070

HOST /etc/network/interfaces:

auto vmbr1
iface vmbr1 inet static
address 10.0.3.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.0.3.0/24' -o wlp3s0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.3.0/24' -o wlp3s0 -j MASQUERADE

CT /etc/network/interfaces:

auto eth0
iface eth0 inet static
address 10.0.3.2/24
gateway 10.0.3.1

CT /etc/resolv.conf:
Code:
# --- BEGIN PVE ---
search 8.8.8.8
nameserver 8.8.4.4
# --- END PVE ---

the command I used to do the port forwarding:

iptables -t nat -A PREROUTING -p tcp -d 192.168.1.100 --dport 7070 -i wlp3s0 -j DNAT --to-destination 10.0.3.2:80

Whein I try to connect I get: ERR_CONNECTION_REFUSED
How can I solve the issue?
 
Last edited:

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!