Questions tagged [port]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Port forwarding OPENVPN to one client (ip changes)

I just installed openvpn on Ubuntu and need to forward specific port to a client. This client is not on LAN and changes ip dynamically. How can forward traffic to a specific account connecting to my ...
  • 1
0 votes
2 answers
16 views

docker exposed port not accessible from outside even when port is opened using iptables command

I have a sample docker tar image in my linux based server and ran that though docker run command as below where 9521f101839f is image id. docker run -p 0.0.0.0:9895:9898 -td 9521f101839f So now ...
  • 101
0 votes
1 answer
29 views

Socat specify source port

How do I specify source port in socat? In netcat I can simply: nc -u -s 192.168.0.1 -p 8888 192.168.0.2 9999 I tried socat udp4:192.168.0.2:9999 STDIN:192.168.0.1:8888 It's failed STDIN: wrong ...
0 votes
0 answers
41 views

How does a telegram bot work in Linux?

I wrote a simple telegram bot and it works great without conflicting with my firewall. But my question is this, in the firewall I have ports 80 and 443 allowed for my site, but when I write a TCP ...
0 votes
0 answers
81 views

Unable to connect to a listening tcp port 80, Iptables is not blocking it

I am trying to see if tcp port 80 is open on a debian 11 server. I logged into it using SSH and did curl -v telnet://localhost:80. It says connection refused. If I do the same with port 22, it shows ...
  • 375
0 votes
0 answers
19 views

How can I make a port inside a virtual machine accessible to the host if the virtual interface has its traffic forwarded through a TPROXY target?

I have a virtual machine connected to virtual interface that has all its traffic sent through a TPROXY transparent proxy: ip tuntap add tap0 mode tap ip link set tap0 up ip addr add 10.0.0.1/24 dev ...
0 votes
2 answers
48 views

Check what service is running on a specific tcp/udp port

I'm looking for a command-line utility that allows me to check what service (eg: http/ftp/ssh) is running on a specific port of a remote machine. An example of how I imagine a program like this would ...
  • 103
0 votes
1 answer
36 views

forward outgoing port and sourcenat this traffic

I have crawled the internet, and tried some config, but so far, i am stucked, so i would need a little help if someone has a better experience than me on this. :) I got a server,server1, behind a ...
  • 1
0 votes
1 answer
31 views

Port forwarding 3389 into local network safety

I've installed xrdp on a system running centOS7 - this allows me to rdp from any pc on the network using the local ip/hostname. I'm looking to be able to rdp straight into the system from outside of ...
1 vote
1 answer
20 views

If ports are unpriviledged, why can't I access them if I am root in a namespace?

I've run sudo sysctl -w net.ipv4.ip_unprivileged_port_start=1. However, sudo ip netns exec myvpn unshare -r python -m http.server -b 127.0.0.1 2 does not work. Strangely enough, this does: sudo ip ...
0 votes
0 answers
25 views

What does the ss output's port number for a unix domain socket mean?

For example, the 15240 below, # ss -xpl | grep stdout u_str LISTEN 0 4096 /run/systemd/journal/stdout 15240 * 0 users:(("systemd-journal",pid=254,fd=5),("systemd",pid=1,fd=...
  • 505
0 votes
1 answer
34 views

Cannot connect to other instances within an AWS LAN

My client installed several AWS instances, all in the same region/datacenter. My task is to install a Redis and a Postgresql instance on one of the machines and make the data store/database accessible ...
-1 votes
2 answers
100 views

how to Find the port number according to PID [duplicate]

The following command can be used to find out which process is listening on a particular port: netstat -ltnp | grep -w ':8011' How can we do the opposite, find the port number according to PID ...
  • 11.4k
1 vote
1 answer
78 views

iptables not blocking access via ports?

I'm running Debian 8.11 with iptables v1.4.21 and ipset v6.23, protocol version: 6. I'm trying to block access to certain ports for all but a small set of hosts, but it doesn't seem to be working. ...
  • 405
0 votes
1 answer
298 views

Serial port to COM port - no output found

I am using Ubuntu WSL1 in Windows. I want to find my serial port which is currently connected on COM4 and I am running this command: dmesg | grep tty, dmesg | egrep tty, setserial commands, but ...
0 votes
1 answer
67 views

iptables: Failure when trying to block port access for most IP addresses, except for a few

I am using Debian 8 linux. I'm trying to block input access to a few ports for most IP addresses, except for a small, select list of IP addresses. I am doing the following, but it does not seem to ...
  • 405
0 votes
0 answers
753 views

How to find port allocation? Bind for 0.0.0.0:80 failed: port is already allocated

My docker-compose.yml version: "3" services: redis: image: redis restart: always postgres: image: postgres environment: POSTGRES_USER: user POSTGRES_PASSWORD: ...
0 votes
1 answer
43 views

Unable to get PID on a Listening port for Solaris

I'm using solaris SunOS myhost4 5.11 11.4.42.117.3 sun4v sparc sun4v non-global-zone I'm sure that port 7777 is in use as the telnet is successful as below: $ telnet myhost4 7777 Trying 10.23.52.219.....
  • 429
0 votes
1 answer
61 views

How to debug source IP which try to access SSH server through port forwarding by SSH

my case is likely following case: SSH client(192.168.0.11) -> public cloud VM with SSH server and setup port forwarding (139.90.90.90)(CentOS7.9)-> one internal SSH server(10.24.24.24)(CentOS 7....
  • 1
1 vote
4 answers
199 views

Can a NAT router run out of ports?

The highest TCP port number is 65535. If a router doing NAT uses an ephemeral port for each connection made to the internet on behalf of the hosts on the internal network, does this mean that it is ...
  • 2,124
1 vote
0 answers
334 views

Raspberry Pi 4 doesn't show USB camera as ttyUSB

I have an RPi camera and a USB camera connected to my RPi4. lsusb: pi@raspberrypi:~ $ lsusb Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 004: ID 0c45:636b Microdia ...
  • 111
0 votes
0 answers
71 views

lspci command doesn't detect monitor through mini dvi port

I just wired a just received 2005 Toshiba TDP S25 Projector VGA to the mini dvi port of my GP66 Leopard via an adapter. However, when I select "Computer 1" on the toshiba menu I have a mere &...
0 votes
1 answer
114 views

Port is shown as "open", then as "filtered" on CentOS Stream 8

I have made a fresh install of CentOS Stream 8 on a machine. This machine needs to connect to a Foreman Smart Proxy on port 443. If I run nmap immediately after machine boots up, it sees the port as ...
  • 26.6k
0 votes
1 answer
42 views

Nmap Shows Different States of the Same Port with Different Scan Methods

When I launch an -sA scan of a certain IP address, it shows port "80" as "unfiltered". Code is below. sudo nmap -sA -vv -p 80 192.168.0.30 -Pn Host discovery disabled (-Pn). All ...
0 votes
0 answers
793 views

Telnet error - "Connection timed out"

I am trying to telnet a port at a client's location. telnet someexampledomain.com 25 It shows: Trying someexampledomain.com... telnet: connect to address someexampledomain.com: Connection timed out ...
  • 101
0 votes
0 answers
149 views

How to limit web usage with nftables?

Between certain times, I would like to limit the amount of internet browsing I can do to force myself to focus (something like visiting ~3 sites per minute). This is what I came up with: table inet ...
  • 419
1 vote
0 answers
941 views

Local port forwarding on Ubuntu 20.04?

I have a service listening on port :3000. However, I would like to change that to port :8080. Unfortunately, the program that I'm running does not allow me to change the listen port. Is there any way ...
0 votes
1 answer
308 views

Can two servers bind the same port?

I was surprised to discover that two servers I'm maintaining are both able to listen on port 3000 in development at the same time. With the first server running, netstat shows ▶ sudo netstat -nap ...
  • 103
0 votes
0 answers
52 views

clearing port in use manually vs waiting 60 seconds

running lmgrd which is a license manager executable that comes with paid-for software, in a work environment. I often resort to kill -9 <pid> of existing lmgrd processes found by doing ps -ef | ...
  • 4,512
3 votes
1 answer
450 views

bash script, check port response with bash's built-in /dev/tcp, time delay | hangs | speed up

With this scripts i check if a host is response on a given port with the bash's built-in /dev/tcp. I can use ip address or domains(hostnames). Script 1 #!/bin/bash HOST_NAME="127.1" ...
0 votes
1 answer
138 views

How to drop packets to port 5901 other than localhost with nftables

I was trying to block VNC port 5901 from internet but accessible from localhost. I have a docker container running on the server, which works fine. After the following 2 commands, I still can access ...
1 vote
0 answers
57 views

Docker expose port only to VPN

I'm setting up a DNS filter using Pi-Hole and OpenVPN on a VPS. Pi-hole is running in a Docker container and exposes port 80 for its web interface. How do I expose this port only to traffic ...
4 votes
1 answer
155 views

firewalld - where are the numeric firewall port numbers mapped to the service name?

# firewall-cmd --permanent --add-service=nfs # filewall-cmd --permanent --add-service=rpc-bind in RHEL/CentOS 7.9 if I do the above, what numeric port numbers are opened in the firewall? Where is the ...
  • 4,512
0 votes
0 answers
31 views

Proxmox host - prevent port scanning outbound

I need some help to protect our /24 subnet to be abused by our customers which receives KVM instances with dedicated IPv4. We would like to detect outbound port scanning activities and brute forcing ...
  • 1
0 votes
1 answer
430 views

ufw won't allow connections to postgres port 5432

With ufw disable on remote postgres system i'm able to connect from my local system However, the connection does not work when I ufw enable as shown below: C:\Users\HOME>telnet 80.240.24.195 5432 ...
  • 429
0 votes
0 answers
25 views

Problem with server - client connection

I run PyCharm on a Debian 11.1 machine and I want to use the Remote debugging with the Python remote debug server configuration. In this debugging procedure PyCharm emulates a server which connects to ...
-1 votes
1 answer
249 views

INVALID_PORT Error from firewall-cmd

When I try to add a port via firewall-cmd --permanent --add-port=XXXXX/tcp I get the error Error: INVALID_PORT: XXXXX Why?
  • 1
0 votes
2 answers
699 views

How to receive a file and save it with socat

**** This is for learning purpose. I just like to deep dive into sockets, tcp, packets, etc. For doing tests and learning, I began to "play" with socat CONTEXT (tests) : 1- Bind a port to a ...
  • 105
0 votes
0 answers
242 views

USB - usb2com device connect and disconect in Debian 11 (bullseye)

I am using Debian 11 (bullseye) a new installation at DELL T5610 workstation. When connect an USB to COM port device it is recognized and mounted properly for a while and then it gone Initial mount is ...
  • 11
0 votes
1 answer
129 views

iptables/firewall-cmd DROP rules set last block ip rule set before

As follow is the list of the iptables rules that I have : # firewall-cmd --direct --get-all-rules ipv4 filter INPUT 0 -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT ... ... ipv4 filter INPUT ...
  • 1
1 vote
1 answer
166 views

Stop Application from listening to a particular port

Background We would like to configure a Linux machine so that it doesn't automatically listen to a port; whether a default port or not. We are using Oracle Linux and RHEL. Issue How can we prevent our ...
4 votes
1 answer
554 views

scp when both hosts are remote and use different ports

I am reposting a slightly edited version of this Ask Ubuntu question SCP with two different ports, as the answer there that works with command-line options only (without modifying ssh_config) no ...
  • 721
0 votes
1 answer
362 views

Connection refused between 2 linux containers

On my host Ubuntu 18.04 I am running two lxc containers using default setups. Containers use Ubuntu 18.04 as well. I have an app running on container1 that offers an https based service on https://...
  • 141
0 votes
0 answers
84 views

What is ftranhc service?

This the output of a nmap $ sudo nmap 192.168.0.33 Starting Nmap 7.80 ( https://nmap.org ) at 2021-11-16 16:13 UTC Nmap scan report for 192.168.0.33 Host is up (0.0062s latency). Not shown: 997 closed ...
  • 577
0 votes
0 answers
232 views

iptables Forwarding and port blocking

I have created the following Network in Virtual Box: Linux Internal PC with 1 Static IP: 10.10.10.2 Linux Gateway/Firewall with 2 Static IP's and 1 NAT: 10.10.10.3 | 11.11.11.2 | NAT Network Card ...
0 votes
2 answers
239 views

Unable to connect telnet to mysql listen ip port from remote host

I m able to telnet locally to mysql process like below: I have also made sure MySQL process is listening on all IPs by setting bind-address = 0.0.0.0 as evident below: root@localhost:~# netstat -plutn ...
  • 429
0 votes
0 answers
48 views

Has my OS been hacked?

My phone has a malware that creates a virtual disk on the partition, so upon factory reset, it can continue is work. (I believe its a Chinese cryptojacking bug.. Runs a whole bunch of encrypted ...
3 votes
1 answer
533 views

netcat closing connection on localhost listening end after connection attempt

Ι am nc-listening on localhost:2500 ▶ nc -l 2500 _ On another terminal I am trying to connect to this listening end ▶ nc -zv localhost 2500 nc: connectx to localhost port 2500 (tcp) failed: ...
  • 2,305
-1 votes
1 answer
401 views

What's the idiomatic way to allow incoming connections on a TCP port, as of 2021?

It's been years since I last fiddled with firewall rules; and I remember the iptables chains for input, forward and output, and their various rules. But the times, they have a-changed, and today ...
  • 7,683
0 votes
0 answers
39 views

Does there exist an epheral port allocation service?

Following up on this question, it would seem that a server that allocates ports within a namespace would be an obvious and useful capability. One use case for such a service/server would be a ...