Hello,
I have a hosted proxmox server with one public ip where i have configured a NAT rules to allow internet access to the VMs that have a separated vmbr1 bridge network, and that is working fine.
The next step that wanted to configre was to be able to SSH to a specific VM, for this reason i wanted to create a port forward rule like this :
*In the /etc/network/interfaces i have configured the following
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3033 -j DNAT --to-destination <internal_ip>:22
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 3033 -j DNAT --to-destination <internal_ip>:22
tried also like this
iptables -t nat -A PREROUTING -i <external_ip> -p tcp --dport 3033 -j DNAT --to-destination <internal_ip>:22
so the idea was to be able to access the VM port 22 through a port 3033 so running this command
" ssh -p 3033 <user>@<external-ip> " throws the following error
"ssh: connect to host <external_ip> port 3033: Connection refused"
also when i run "telnet <external-ip> 3033" i recive
telnet: Unable to connect to remote host: Connection refused
For example if i try to ssh to that specific VM from a different VM in that same subnet throgh the <user>@<internal_ip>, i am able to do it successfully..
So regading this problem i tried to open the port 3033 for example like this in the iptables and save the configuration by running " iptables-save " , also tried to add my public ip, but nothing worked
1 ACCEPT tcp -- anywhere anywhere tcp dpt:3033
Also tried to create a Firewall rule in the Datacentar/Node where i added, but nothing changed
conclusion: All the ports that are opened by defauly are working fine, but any aditionall one that i want to open, it doesnt work. Is there some other place that i need to check/run some configuration to open the port or do i need to contact the hosting company?
Thank you for the help in advance.
I have a hosted proxmox server with one public ip where i have configured a NAT rules to allow internet access to the VMs that have a separated vmbr1 bridge network, and that is working fine.
The next step that wanted to configre was to be able to SSH to a specific VM, for this reason i wanted to create a port forward rule like this :
*In the /etc/network/interfaces i have configured the following
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 3033 -j DNAT --to-destination <internal_ip>:22
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 3033 -j DNAT --to-destination <internal_ip>:22
tried also like this
iptables -t nat -A PREROUTING -i <external_ip> -p tcp --dport 3033 -j DNAT --to-destination <internal_ip>:22
so the idea was to be able to access the VM port 22 through a port 3033 so running this command
" ssh -p 3033 <user>@<external-ip> " throws the following error
"ssh: connect to host <external_ip> port 3033: Connection refused"
also when i run "telnet <external-ip> 3033" i recive
telnet: Unable to connect to remote host: Connection refused
For example if i try to ssh to that specific VM from a different VM in that same subnet throgh the <user>@<internal_ip>, i am able to do it successfully..
So regading this problem i tried to open the port 3033 for example like this in the iptables and save the configuration by running " iptables-save " , also tried to add my public ip, but nothing worked
1 ACCEPT tcp -- anywhere anywhere tcp dpt:3033
Also tried to create a Firewall rule in the Datacentar/Node where i added, but nothing changed
conclusion: All the ports that are opened by defauly are working fine, but any aditionall one that i want to open, it doesnt work. Is there some other place that i need to check/run some configuration to open the port or do i need to contact the hosting company?
Thank you for the help in advance.