This website is deprecated, and remains online only for historic access to old issues and docs for historic versions of Virtualmin. It has been unmaintained for several years, and should not be relied on for up-to-date information. Please visit www.virtualmin.com instead.
I want to setup remote desktop and I need to open port 5901. I was not successful to do so in ssh. How I can do this in Webmin to check if it is really open?
To answer this kind of questions, we need more information about your server and network. In addition to what Eric asked: What kind of server do you have (rented, co-located, at home, virtual or physical)? Is it behind a router or hoster-side firewall? What Linux distro? Are you running a software firewall? If so, which one? iptables? Are you additionally using a hardware firewall or Linux FW distro like IPCop?
This second option is sometime much easier and faster. In summary you use only two command lines to open a port, then you optionally use Webmin for customizing the newly open port. If you are using Debian and IPTables (Linux Firewall) for your firewall, and if you are familiar with Terminal/Console, the steps:
SSH into your server either as Sudo or as Root
Run this first command line to open a port
iptables -A INPUT -p tcp -m tcp --dport <PORT TO OPEN> -j ACCEPT
In this command line above, simply replace <PORT TO OPEN> with any one port you need to open. For example iptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
Run this second command to save the newly open port to the master IPTables configuration file.
iptables-save > /etc/iptables.up.rules
You need to apply the IPTable configuration. To do so using Webmin, navigate to “Networking ---> Linux Firewall”. Scroll all the way down this page. Click on “Apply Configuration” button.
Optionally, you can use Webmin to either customize, block/close, or delete the new firewall rule you created above. To do so, using Webmin navigate to “Networking ---> Linux Firewall”. Or go directly to /firewall/?xnavigation=1
Is your server behind a NAT router?
If so, you would need to forward port 5901 from your router to your server.
You would only need to open a port on your server if you had setup a firewall on it, which isn't the default setting.
If you are running a firewall on your server -- do you know what kind of firewall it is, or how it was setup?
-Eric
Also, what did you do in SSH to "open the port"?
To answer this kind of questions, we need more information about your server and network. In addition to what Eric asked: What kind of server do you have (rented, co-located, at home, virtual or physical)? Is it behind a router or hoster-side firewall? What Linux distro? Are you running a software firewall? If so, which one? iptables? Are you additionally using a hardware firewall or Linux FW distro like IPCop?
Two options to do this
First option
Using Webmin, under “Networking ---> Linux Firewall”. But this might be lots of clicks. Find the next steps into this documentation at https://doxfer.webmin.com/Webmin/Linux_Firewall#Allowing_and_denying_net...
Second option
This second option is sometime much easier and faster. In summary you use only two command lines to open a port, then you optionally use Webmin for customizing the newly open port. If you are using Debian and IPTables (Linux Firewall) for your firewall, and if you are familiar with Terminal/Console, the steps:
SSH into your server either as Sudo or as Root
Run this first command line to open a port
iptables -A INPUT -p tcp -m tcp --dport <PORT TO OPEN> -j ACCEPT
In this command line above, simply replace
<PORT TO OPEN>
with any one port you need to open. For exampleiptables -A INPUT -p tcp -m tcp --dport 10000 -j ACCEPT
Run this second command to save the newly open port to the master IPTables configuration file.
iptables-save > /etc/iptables.up.rules
You need to apply the IPTable configuration. To do so using Webmin, navigate to “Networking ---> Linux Firewall”. Scroll all the way down this page. Click on “Apply Configuration” button.
Optionally, you can use Webmin to either customize, block/close, or delete the new firewall rule you created above. To do so, using Webmin navigate to “Networking ---> Linux Firewall”. Or go directly to
/firewall/?xnavigation=1
Done you have successfully open a port
Documentation
- - -
Senior Product Manager, and Co-Founder at Ubertus.org Inc.
Love back your Virtualmin & Webmin community
IF CSF firewall then there to. ;)
And all firewall related parts at client side ofcourse. ;)