Hot answers tagged ports
5
You can handle this with a transport map. First tell postfix to use a map, with the following in main.cf:
transport_maps = hash:/etc/postfix/transport
Then in /etc/postfix/transport add the custom route:
example.net smtp:example.net:26
Then build the map database:
sudo postmap /etc/postfix/transport
4
Newer versions of Tor have a file /etc/default/tor.vidalia. It contains three lines:
if [ -x /usr/bin/vidalia ]; then
RUN_DAEMON=yes
fi
You can change the option to no. This will prevent from starting as daemon. Instead Tor will now start when you start Vidalia.
3
Just use the Listen directive in your Apache configuration file.
For instance, right now you'll probably have Listen 80, just add Listen 8880 after it:
Listen 80
Listen 8880
and restart Apache.
3
This sort of discussion comes up from time to time and IMO the best answer is that Linux is not Windows and at this time the current firewall policy is considered sufficient by the Ubuntu developers / security team as, by default, there are no open ports.
See : https://wiki.ubuntu.com/SecurityTeam/Policies
The utility of a firewall in the sort of concerns ...
3
Port 25 is, as your post already says, SMTP. This means there is a mailserver installed and listening to requests on your port 25. This is quite unusual on a desktop computer, propably happened accidentaly while installing another program that sends emails.
Port 631 is the port for CUPS, the printer driver software. This is quite usual as it comes with the ...
3
I've checked the source code, first the original (netcat-openbsd_1.89.orig.tar.gz). The relevant lines in netcat.c (367-388) (edited):
if (vflag || zflag) {
/* ... */
/* Don't look up port if -n. */
if (nflag)
sv = NULL;
else {
sv = getservbyport(
ntohs(atoi(portlist[i])),
uflag ? "udp" : "tcp");
...
2
This behavior is normal. 7 "users" is not actually 7 users. It is just 7 console sessions that are not doing anything but sitting at a console ready for commands if you switch using [Ctrl]+[Alt]+N. Also, the "sleeping" is normal, as most processes are inactive, but waiting for user interaction, or work delegated from another process. Most processes are ...
2
What you see is a perfectly healthy desktop.
Virtual memory
Virtual memory has nothing to do with real memory (aka RAM). It's an information that is useful for hackers /Linux developers. Basically on most OS, a process does not map its memory directly to physical memory, but to a virtual memory. If you have enough space, its all in your RAM, but in case ...
2
I see that you are getting your router's config page, and this means that your port 80 is not forwarded. Also, you can access it from 192.168.25.1 as that IP is inside your network and never changes(Think of an apartment building that moves around and has its street address change but the apartment numbers are constant). Consider http://freedns.afraid.org to ...
2
Mike's sudo ufw allow Samba works like a charm.
I personally prefer restricting to my private subnet, so for others who like the same, use:
$ sudo ufw allow from 192.168.0.0/16 to any app Samba
Also, try running sudo ufw app list for a list of other apps you can use as short-hand to the required ports (eg. Postfix, OpenSSH, etc). Makes your firewall ...
2
My suggestion, if you are sure that the ports are closed (Find it weird for a VPS to have that port closed) is to change the configuration file of mysql to use another.
Simply open the conf file in the terminal:
sudo nano /etc/mysql/mysql.conf and look for the [mysqld] section. In it look for the line that reads port = 3306. Change it to another ...
2
Your best bet generally is to run a firewall from day one -
sudo ufw enable
which will block all inbound traffic by default. This gives peace of mind that if you install something that silently opens ports on your system (such as enabling network printing), then you're still protected generally.
Conversely, this will mean that you will install ...
2
You can get list of ports from file called /etc/services
cat /etc/services | grep 137 (example)
Example
What ports need to be open for Samba to communicate
netbios-ns - 137 # NETBIOS Name Service
netbios-dgm - 138 # NETBIOS Datagram Service
netbios-ssn - 139 # NETBIOS session service
microsoft-ds - 445 # if you are using Active Directory
run ...
2
Connecting to a port on a server via an ssh tunnel can be done with the -L local port forwarding option.
For example, to connect to www.example.com:80 & to make it available on the client as port 8080, you would do:
ssh -L8080:127.0.0.1:80 www.example.com
This allows you to go to http://127.0.0.1:8080 in your browser & have www.example.com:80 ...
2
Try this:
As root, open /etc/default/ufw
Look for the line like this:
IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc"
Add nf_conntrack_netbios_ns to the line so that it looks like this:
IPT_MODULES="nf_conntrack_ftp nf_nat_ftp nf_conntrack_irc nf_nat_irc nf_conntrack_netbios_ns"
Now reload the firewall:
sudo ufw reload
1
You can use logging to find out if you're blocking a port that should not be blocked.
tail -f /var/log/ufw.log
Some extra information in case you havened tried it already:
ufw manual , ufw wiki
1
I had the same problem.
Here's what I suggest: After installing Gufw, make sure you log out of your account and then log back in.
It worked for me.
In general, whenever you have a problem with software you just installed, try the above suggestion first.
You will be surprised as to how often it cures the problem.
1
sudo iptables -L will list the port rules for your pc.
Note that if you are using ufw or shorewall firewalls the output maybe be hard to read.
In that case rather use sudo ufw status for example.
This is not very useful on its own as even if a port is open access will still be denied if there is not process listening on that port.
1
This is enough to show that there is a process listening on IP address 0.0.0.0 (needed so it will reply to any request) on port 80 (standard web server port number). In my case this shows it is the web server lighttpd
$ sudo netstat -ntlp | grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 2495/lighttpd
If you ...
1
I generally run a closed firewall with only necessary ports open. Some of the traffic you need to allow (outgoing unless otherwise specified):
Establised, related (short circuits access for open connections) bi-directional.
ICMP types 3 and 4 incoming, and 11 outgoing
UDP port 123 for NTP.
UDP and TCP port 53 for DNS.
TCP ports 25 and 587 for STMP email ...
1
Outgoing connections require that they be originated from inside the firewall. In most cases this will be a user initiated activity. Configuring a firewall with a closed policy for outgoing traffic is a difficult undertaking and requires maintenance for each new service or Internet client which is installed. Depending on the installed software and use of ...
1
Your question is quite broad, and "secure" is relative.
When you install a server, and open a port, there are always going to be potential vulnerabilities.
When you install a server (ssh , samba) , and start the server (they usually start by default when you boot) you open a port.
With each server (ssh, samba, http) there are configurations changes you ...
1
"filtered" doesn't necessarily equate to an open port on the target host.
In fact, it might mean nothing at all.
If, for example, there is a firewall in between wherever you're running nmap and the target, and that firewall is actively filtering out port 5000, then 5000 will appear as "filtered" in your list, without the target host ever seeing any traffic ...
1
You can allow specific programs (not users) to open privileged ports:
setcap 'cap_net_bind_service=+ep' /path/to/executable
As for restricting access to certain ports, see Allow/Deny a user from binding a range of ports.
1
In Linux, all the firewalls are actually interfaces to setting up the rules of the kernel iptables.
To list all rules, type
sudo iptables -S
You can also see what firewall packages are installed by writing
dpkg -l | grep -i firewall
1
To list rules on local machine use
sudo iptables -L -n
Ubuntu is shipped with firewall(ufw), which is not enabled by default
To check status of firewall:sudo ufw status
To enable: sudo ufw enable
To disable: sudo ufw disable
To allow traffic on port: sudo ufw allow <port_num>
To block a port: sudo ufw block <port_num>
To check what ...
1
The correct command to open that port would be
$ sudo ufw allow 3000 # from all hosts
$ sudo ufw allow from 192.168.1.0/24 to any port 3000 # just to some subnet hosts
Also you can resort to gufw, which simplifies a lot the firewall management.
Only top voted, non community-wiki answers of a minimum length are eligible
