Tag Info

Hot answers tagged

37

TL;DR - go to the bottom of the answer, "Applying the restrictions" Adding a restricted user consists of two parts: 1. Creating the user 2. Configuring the SSH daemon (sshd) Configuring sshd The best place to get known to the possibilities of SSH is by reading the related manual pages: ssh(1) ssh_config(5) sshd(8) sshd_config(5) Where can SSH client ...


8

Things to check: What is the "host" field set to for your MySQL user? If it is localhost or similar then the MySQL server is denying access because you are connecting from an external machine. Change the host field to % to allow connections from any IP (though obviously never use this in a production environment where the guest is accepting connections ...


8

I looks like you're not running SSH on port 26 on the second machine. You can either change the port number on that machine to 26 (edit /etc/ssh/sshd_config ... don't forget to restart SSH) or leave it on 22, but forward port 26 on the router to port 22 on the second machine. Also, don't forget to change any firewall settings on the second machine to allow ...


7

Run this on the commandline; it should solve issue: sudo iptables -A INPUT -m conntrack --ctstate NEW,RELATED,ESTABLISHED -j ACCEPT To do a specific port: sudo iptables -A INPUT -p <tcp OR udp> <--dport OR --sport> <port> -j ACCEPT INPUT is the chain for incoming traffic. -p is protocol (either tcp or udp --dport or --sport specify ...


5

There are a number of factors at play, mainly your Apache configuration and the network setup of your VM. You are on the right track with the Apache setup, but I would use netstat to find the port your Apache is listening to: gomo@wks120:~/$ sudo netstat -puant | grep apache | grep LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* ...


5

Is anything listening on port 8888? If nothing is listening on the port you can't connect to it. You can check if anything is listening on that port with sudo netstat -tulpn The port is likely open already as linux firewalls won't block localhost if you don't ask them to block it.


5

You can simply use openssh to do so: https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding The commands to look for are -L or -R. Let's say you want to forward port 4444 on the server to port 5555 on the local machine. On the Server use ssh -L 4444:local_machine_name:5555 user@local_machine_name or on the local machine use ssh -R ...


5

Your ISP may block connections to port 22 (nothing you or your router can do about it). Just set SSHd to run on a different port, e.g. 2222. In /etc/ssh/sshd_config, change Port 22 to Port 2222 and then sudo service ssh restart. Port forward 2222 (or whatever), and try again.


4

You're setting up the redirection incorrectly. To get the SOCKS proxy you need to set up a dynamic redirect -- just one different click (see screenshot). You just need to set the port you want to use on localhost (here, 8888), and leave the remaining as is (n/a).


4

My transmission works w/o messing with settings. 1 thing you do need to do is to open ports on your router. Transmisson has a button to check if the port is open: If it shows 'port is closed' check your router settings. Mine looks like this: A BitTorrent client normally associates the TCP port number 6881. However, if this port is busy for some ...


4

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.


4

-j REDIRECT redirects to your own machine. If you want to redirect to a different port on the remote machine, use -j DNAT --to-destination :23


4

On Ubuntu 11.10, I turned on the 'Desktop Sharing' application that comes with the OS and found that these ports are opened on my computer: 5800/tcp open vnc-http 5900/tcp open vnc They seem to be just the VNC ports. If you want to verify this for yourself, download this tool from the repository called nmap: sudo apt-get install nmap When you ...


3

The problem with VNC is that in most cases you have at least one firewall between your destination computer and your machine. That's why you are unable to connect unless you are on the same network. ISPs used to put firewalls on their ends in some cases (eg. mobile internet) but if you use a router to share the internet connection between multiple machines ...


3

You can change this within your client config: The line looks like remote 192.168.100.1 You can add the port after the ip address: remote 192.168.100.1 21 Thats it.


3

This is possible using iptables. There is a nice howto on linuxhomenetworking.com and more info on iptables can be found on the ubuntu wiki . Note that there is also a GUI interface to iptables called Firestarter.


3

iptables -t nat -A PREROUTING -p tcp --dport 25570 -j REDIRECT --to-port 25565 This assumes you're not routing traffic for an entire network through this box and that if you were there's no expectation that traffic destined for other hosts will be on that port


3

Generally, firewalls don't block local traffic. If your client application connects to port 49100, it expects to find a service (whatever that is) there. So, you need to start the server application (whatever that is) that listens on port 49100 and provides with the service that the client application is expecting to find there. 49100 is not a port ...


3

I use port 22 only for the intranet ssh access. For access via internet I use a custom (unusual) port. This has the benefit the I reduce the load produced generated by script kids who are scanning port 22 for "well known usernames" The external sshd processes are controlled by xinetd and running in parallel to the internal sshd process. In the following ...


3

sudo iptables -A INPUT -i eth0 --proto tcp --dport 12345 -j ACCEPT this will allow incoming traffic to the network interface eth0 for tcp port 12345. You didn't specify if you were referring to tcp or udp. You can list the rule with: sudo iptables -L -n


3

If you have iptables installed on 10.0.0.132, I think this will be pretty straightforward: iptables -t nat -A PREROUTING -j DNAT -d 10.0.0.132 -p tcp --dport 29418 --to 10.0.0.133 This says to send traffic coming in to 10.0.0.132 on port 29418 over to 10.0.0.133 instead, on the same port, prior to any other routing that 10.0.0.132 might try to do. If you ...


2

I suppose you have still something connected to local port 3000. You can find it with netstat -tulpn | grep 3000 and then dispose of it. For example in my machine: [:~] % netstat -tulpn | grep 5900 (Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) tcp 0 0 ...


2

So I solved my problem. It had to do with the firewall. The command to make the port accessible on the local network ip (192.168 etc.) was: sudo ufw allow [port-number].


2

Once you can connect to the machine from inside your LAN, the rest is completely outside of the control of Ubuntu running on that machine. So the problem is likely to be somewhere outside of your Ubuntu box. Possible causes may include: incorrectly configured port forwarding on your router. Note that the internal IP of your machine may change when you ...


2

The line which starts with -t nat shouldn't be under the filter table, as denoted by the first line. Change the file to the following: *filter :INPUT ACCEPT [0:0] :FORWARD ACCEPT [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT -A INPUT -p icmp -j ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m state --state NEW -m tcp -p tcp ...


2

Why would you want to use xshell in Ubuntu? The standard ssh client that comes with Ubuntu has all the port forwarding capabilities you probably need.


2

Check the SSH service status and start the SSH service if it is stopped: sudo service ssh status In my case SSH was stopped, but after starting the service: sudo service ssh start I can be able to remote login to Linux.


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

Port 80 is the standard HTTP port, so you just have to install a web server (eg. apache2) on your Ubuntu machine. When it comes to the router, you just have to forward port 80 on the router to port 80 on your Ubuntu machine. How to do that depends on the router, but it should be configurable from the web interface.


2

If you use the -v option to ssh it will show you what you are forwarding (but it will show you a bunch of other debug messages, too): ssh -v -L2222:localhost:22 remotehost Will show you: ...debug messages... debug1: Authentication succeeded (publickey). Authenticated to remotehost ([10.0.0.23]:22). debug1: Local connections to LOCALHOST:2222 forwarded to ...



Only top voted, non community-wiki answers of a minimum length are eligible