vsftpd on ubuntu virtual box on local it is connected but on remote it is saying ftp: connect: Connection timed out - ftp

I am using a windows virtual ubuntu box and trying to configure vsftp for ftp
here is my vsftpd.conf
listen=NO
listen_ipv6=YES
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
use_localtime=YES
xferlog_enable=YES
connect_from_port_20=YES
chroot_local_user=YES
secure_chroot_dir=/var/run/vsftpd/empty
pam_service_name=vsftpd
force_dot_files=YES
pasv_min_port=40000
pasv_max_port=50000
user_sub_token=$USER
local_root=/home/$USER/ftp
allow_writeable_chroot=YES
tcp_wrappers=YES
userlist_file=/etc/vsftpd.userlist
userlist_deny=NO
userlist_enable=YES
here my ufw status
i can connect using localhost
ftp localhost
but I can not connect on remote ftp
ftp x.x.x.x
ftp: connect: Connection timed out
I tried using disable ufw but same issue ...
can anyone guide me what i am doing wrong here
I am trying to setup a ftp server on my windows remote ubuntu virtual box
I already configure my apache webserver on custom port 8080 and it is working fine

Related

postgres: client could not connect to server

For clarification, please note that I have found several similar questions on stackoverflow, but I could not fix my issue.
psql: could not connect to server: Connection refused” Error when connecting to remote database
psql: How to Allow Remote Access to PostgreSQL database
I am trying to connect to a postgres DB installed in a remote server.
To create a connection from the client I am using QGIS plugin (Add PostGIS Layer):
The error that occurs is:
could not connect to server: Connection refused (0x0000274D/10061) is the server running on host "localhost" (::1) and accepting TCP/IP connection on port 5432
Additionally I added the host's IP Adress in the Host field, but then another error message occurs:
could not connect to server: Connection timed out (0x0000274C/10060) Is the server running on host "hosts_ip_adress" and accepting TCP/IP connections on port 5432?
My settings are:
Postgres installed version is 10.0 with PostGIS extension
Host operating System: Windows 7
Client operating System: Windows 7
I edited pg_hba.conf to:
host all all 0.0.0.0/0 md5
and changes listen parameter in 'postgresql.conf' to:
listen_addresses = '*'
both files are located in C:\Program Files\PostgreSQL\10\data
restartet pgAdmin4
My devices are in the same network. Each one is connected via LAN cable.
I suppose that a firewall is preventing the connection?

can't connect to postgres on windows10

I am setting up project on my windows PC and I have a problem with postgres.
Project is set on docker.
when I run docker-compose up I receive error
: *** Failed to connect to database dev; trying to create database
/usr/local/bundle/gems/sequel-4.48.0/lib/sequel/adapters/postgres.rb:224:in `initialize': PG::ConnectionBad: could not connect to server: Connection refused (Sequel::DatabaseConnectionError)
Is the server running on host "localhost" (127.0.0.1) and accepting TCP/IP connections on port 5432?
could not connect to server: Cannot assign requested address
Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432?
I don't know what to do. I have already installed microsoft easy-fix for TCP-IP, shut down windows firewall, changed all connection in pg_hba.conf to trust. Nothing helps. I don't have any antivirus software installed.
nmap report:
Nmap scan report for localhost (127.0.0.1)
Host is up (0.0027s latency).
Other addresses for localhost (not scanned): ::1
Not shown: 995 closed ports
PORT STATE SERVICE
135/tcp open msrpc
445/tcp open microsoft-ds
2068/tcp open avocentkvm
2179/tcp open vmrdp
5432/tcp open postgresql
edit:
I run psql -h localhost and received
psql: CATASTROPHIC: role "Kamil" does not exist
Kamil is my PC name.
edit2:
is it possible that docker doesn't have access to postgres on localhost?
problem solved
I had to set environment var to DB_HOST=docker.for.win.localhost

Telnet / Security Groups

I'm in the middle of installing and configuring an XMPP server, using ejabberd on Windows server 2012, running on an EC2 box.
I have opened port 5222 within windows firewall, and added to the security group for the EC2 instance
Custom TCP Rule
TCP
5222
0.0.0.0/0
ejabberd_c2s
Custom TCP Rule
TCP
5222
::/0
ejabberd_c2s
My XMPP logins are not working, and so I've turned to telnet to try and debug - it sees that port 5222 is reporting as closed:
PS C:\WINDOWS\system32> telnet hostname.com 5222
Connecting To hostname.com...Could not open connection to the host, on port 5222: Connect failed
Any guidance or steps towards debugging would be appreciated!
The issue here was in ejabberd's default configuration of "::" as an IP to listen, which forced it to listen only to IPv6.
By updating the ejabbed config to
port: 5222
ip: "0.0.0.0"
module: ejabberd_c2s
I was able to connect via telnet, and able to access the server using XMPP.

SSH connection refused conencting from Unix server to Windows server

I am trying to execute the below command in putty.
ssh username#servername
I am getting the below error messsage:
ssh: connect to host servername port 22: Connection refused
I am trying to connect to a Windows server from a Unix server. Please help me!
The main think is that Windows Server doesn't contain ssh daemon in the box. You could install telnet server from the Windows components and connect from unix to windows machine by telnet command or use 3d-party ssh servers/cygwin.
More available on Server Fault or SO. (How ironic, both topics are closed as offtopic)

Connecting to Heroku using port 443

I'm a university student and all ports except 80, 443 are blocked. I'm able to connect to github via
Host github.com
Hostname ssh.github.com
Port 443
git push heroku master gives me this error:
ssh: connect to host heroku.com port 22: Connection refused
fatal: The remote end hung up unexpectedly
I've tried the solutions posted here on SO but I've still not got it working. Is there a way I can connect to heroku do deploy my websites?
Thanks a lot
Heroku ssh only works over port 22. There is, however, a plugin that lets you push via HTTP. It does not use git, though. Instead, you heroku push.
https://github.com/ddollar/heroku-push
If your SSH port been blocked and wish to push into heroku using alternate port then you may consider Tunneling.
For tunneling you are required to have additional PC or Server resides outside of blocked network and having access to Port 22.
For the scenario below we can use house PC to tunnel into heroku server. Since the university network only allow Port 80 and 443, we can set the House PC to receive connection via port 443 and tunnel it to port 22.
At House PC:
Configure SSH server in the house PC to run on port 443. Refer here to configure SSH Server on Multiple Ports
University PC:
Configure University PC to resolve git_tunnel alias to point to localhost on port 9001. Edit ~/.ssh/config and add following
# ~/.ssh/config
Host git_tunnel
Hostname 127.0.0.1
User git
Port 9001
Add a new remote alias as tunnel which will point to git#git_tunnel:{app name}.git
git remote add tunnel git#git_tunnel:{app name}.git
From the University PC establish tunnel to house PC which listening on port 443.
ssh -L 9001:heroku.com:22 -p 443 root#housepc.com
Deploy to heroku using alias tunnel created earlier
git push tunnel master

Resources