Score:0

OHV VPS ports not modified. Where are those rule set?

cn flag

I have a problem with a VPS ports config (on ovh.com).

  • I set up Debian 10 and updated it.
  • I didn't install any firewall software.
  • OVH infrastructure is protected by a global firewall, but on my panel it's shown as disabled and there are no rules applied.
  • Default ports work fine (HTTP, TCP, UDP, SSH, FTP, DNS and SSL).

EXAMPLE (FTP)

FTP works just fine on port 21:

client

$ ftp XX.XX.XX.XX
Connected to XX.XX.XX.XX.
220 (vsFTPd 3.0.3)
Name (XX.XX.XX.XX:f): NAME
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>

If I go to yougetsignal.com and it shows Port 21 is open and Port 2121 is closed.

Then I change the listening port to 2121, and it doesn't connect any more

server

# sudo nano /etc/vsftpd.conf
# changes done: "listening_port=2121"
# sudo service vsftpd restart

$ sudo netstat -tnlp | grep :2121
tcp6   0   0   :::2121   :::*   LISTEN   28582/vsftpd

#rules allow all in
$ sudo iptables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

$ sudo ip6tables -S
-P INPUT ACCEPT
-P FORWARD ACCEPT
-P OUTPUT ACCEPT

client

$ ftp
ftp> open XX.XX.XX.XX
ftp: connect: Connection refused
ftp> open XX.XX.XX.XX:2121
ftp: connect: Connection refused

If I go to yougetsignal.com and it shows Port 21 is closed and Port 2121 is closed.

Same happens for any other port.

Where else can be those rules be defined, since any change I make on ip6tables or iptables seems to do nothing?

UPDATE

As commented by Michael, it was space, not colon.

client

ftp> open XX.XX.XX.XX 2121
Connected to 51.222.30.108.
220 (vsFTPd 3.0.3)

On the other hand, the external test still throw "Closed", and the command commented by vidarlo, netcat -lp 2121, returns Can't grab 0.0.0.0:2121 with bind.

Michael Hampton avatar
cz flag
There should be a space between the host and port, not a colon. See the man page.
vidarlo avatar
ar flag
In addition, it's often easier to fault find using `netcat`. Fire up `netcat -lp 2121` and it will dutifully listen on port 2121 on all interfaces. This removes complex software from the mix, and allows you to trivially establish if the problem is in the network layer or your configuration.
Fahed avatar
cn flag
I updated the question, @vidarlo . Does that mean there is an error?
vidarlo avatar
ar flag
@Fahed It means the port is *probably* in use. `netstat -tlnp | grep 2121` should show you.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.