LXC port not open

arifroni

New Member
Jan 4, 2023
8
0
1
Hello

I installed ubuntu CT. An application is running and listening to 127.0.0.1:5000. But from another machine, I cant hit the API. I checked and found the port is not open on that LXC.

output from proxmox
Code:
root@arifroni:~# pct config 100
arch: amd64
cores: 1
cpulimit: 0.5
features: nesting=1
hostname: 3Hustlers
memory: 2048
net0: name=eth0,bridge=vmbr0,gw=192.168.1.1,hwaddr=32:25:98:89:54:E3,ip=192.168.1.217/24,type=veth
onboot: 1
ostype: ubuntu
rootfs: local:100/vm-100-disk-0.raw,size=32G
swap: 2048
unprivileged: 1

Output from LXC
Code:
root@3Hustlers:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0@if22: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 32:25:98:89:54:e3 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.1.217/24 brd 192.168.1.255 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::3025:98ff:fe89:54e3/64 scope link
       valid_lft forever preferred_lft forever

root@3Hustlers:~# netstat -tulpn | grep LISTEN
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN      96/systemd-resolved
tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN      96/systemd-resolved
tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN      272/master
tcp        0      0 127.0.0.1:5000          0.0.0.0:*               LISTEN      793/python
tcp6       0      0 :::22                   :::*                    LISTEN      1/init
tcp6       0      0 ::1:25                  :::*                    LISTEN      272/master

What could be the issue?
 
Last edited:
Hi,


This is not a Proxmox VE issue. However, the port is listening on localhost, not for the public network.
 
this depends on the service running inside the CT, or you can use SSH to forward the 5000 port.
 

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!