Tag Info

Hot answers tagged

31

The command for forwarding port 80 from your local machine (localhost) to the remote host on port 8000 is: ssh -R 8000:localhost:80 oli@remote-machine This requires an additional tweak on the SSH server, add the lines to /etc/ssh/sshd_config: Match User oli GatewayPorts yes Next, reload the configuration by server executing sudo reload ssh. The ...


17

sshuttle is a transparent proxy server that forwards over a SSH connection and sets up a proxy by running Python scripts on the remote server. sshuttle can be run under the following conditions: client machine or router is Linux-based, FreeBSD or Mac OS administrative privileges on client access to remote network via SSH no administrator privileges on ...


14

There are two ways you can do this with SSH. Tunnel Everything with a SOCKS proxy Log in to the remote machine using the following command: ssh -D 8080 remote-host Now go to your browser's proxy settings, and configure it to use a SOCKS proxy with host name 127.0.0.1 and port 8080 (or whatever port you passed to the -D option). Now all pages you load ...


12

You cannot setup OpenVPN without root privileges because certain operations requires it. Prerequisites: you need to enable packet forwarding in your (iptables?) firewall Adding devices in operation: a special virtual device has to be added using ifconfig. Otherwise, no communication is possible between the server and client Depending on your needs, other ...


9

If your friends are able to SSH onto your computer, they are using some of your bandwidth and it is therefore impossible to completely block them access to your Internet connection. That being said, one solution would be to limit what your friends can do with your connection. You could set up a firewall that whitelists your friend's IPs and blacklists ...


6

Set up password-less SSH login according to this answer: ssh-keygen (you will be prompted for a password, leave it blank) ssh-copy-id user@userserver (enter your SSH login password for the last time) Add an startup entry for SSH:


6

You can use sshuttle. While doing it over SSH isn't the greatest idea, it works, and I've lost count of how many times I've used it when I can't get into my VPN. This is how to get it set up: First, make sure git is installed by running: sudo apt-get install git Then, clone the code from github: git clone git://github.com/apenwarr/sshuttle You'll ...


6

Yes, using ProxyCommand in your SSH config. Create an SSH configuration file in your home directory (unless you want to make this system-wide), ~/.ssh/config: Host unibroker # Machine B definition (the broker) Hostname 12.34.45.56 # Change this IP address to the address of the broker User myusername # Change accordingly Host ...


5

install ssh First things first. You need ssh installed. Not just the client, the server too. Find out: $ which ssh /usr/bin/ssh $ which sshd /usr/sbin/sshd If which can't find them, you need to install: sudo apt-get install ssh sshd. The install process should set up everything, but just in case, make sure the ssh port (22), is open (if ufw is disabled, ...


5

Note that while you can disable TCP Forwarding by sshd, you need to go a lot further to restrict your users' outgoing activity. Giving them a shell means giving them a lot of power. For instance, if they can scp files to the server and execute files in /home, they can simply upload a pppd binary, and use that to run PPP over SSH. If you allow incoming ...


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).


3

ssh tunnels are the wrong tool for this; you want a VPN (or possibly TOR, but probably not if you only care about a single fixed endpoint server).


3

If you're using OpenVPN 2.1 or 2.2 you can find what you're looking for here. Bernhardt Schmidt has also put together a package for Ubuntu that includes the IPv6 payload patch integrated with OpenVPN. Since this question is old, hope this is still relevant.


3

To get a grip on what is happening with your networking, ifconfig is a great tool. It shows you all the interfaces on your computer and what addresses they have. Another good tool is ip -6 route show (IPv4 version: ip route show). 6to4 addresses always start with '2002:xxxx:xxxx:' (for example 2002:40b8:f37f:). In comparison, a teredo address will always ...


3

Here's what I use to load my webmin on my servers (which is firewalled away so only somebody with ssh access can see it): ssh -l oli -L 9090:localhost:9090 my-server-ip That connects me to the server and maps my local port 9090 to the server's P9090. I just browse at http://localhost:9090/ and I can see the webmin. If you're trying to connect to ...


3

that is very very AFAIK, but I decided to make answer and not a comment. OpenVPN uses certificates, and there should be some certificate/key exchange involved, so to establish tunnel it will take longer than IPSEC with peer negotiation and establishing of tunnel. Afterwards if same encryption is used you will see no difference. I should note, that OpenVPN ...


3

If you want to use putty as a dynamic proxy to go across the firewall, just select "Dynamic" and type any available source port you wish(ie. 9050), then press "Add". Things get done :D Go to your system proxy setting(ONLY configure in your browser if you want it to be the browser's proxy) , only set the socks v5 proxy as 127.0.0.1:yourport (ie. ...


2

This answer belongs to brandonchecketts. Assume You have two hosts named as Host-A and Host-B. Now we are going to create a SSH Tunnel between these two and make sure that Tunnel is up & live for all the time. Configuration Need to be done for Host-A: Open your terminal , turn into root and paste the code one after one useradd -d /home/tunnel tunnel ...


2

You need to let the first command run in the background and start the second one after the first has been initiated. I'm sure there is a more elegant way (of sorts) but this should do the trick. python ~/Downloads/usbmuxd-1.0.8/python-client/tcprelay.py -t 22:2222 & ssh -l root -p 2222 127.0.0.1 The ampersand at the end tells bash to run the python ...


2

An adaptation of MadMike's answer, you can use the following commands: python ~/Downloads/usbmuxd-1.0.8/python-client/tcprelay.py -t 22:2222 & while ! (: < /dev/tcp/127.0.0.1/2222) 2>/dev/null; do sleep 1 done ssh -l root -p 2222 127.0.0.1 This will execute the python program in the background, then wait (checking once a second) until ...


2

Well... I'd say you can ssh your U machine and then issue the necessary lp or lpr commands. It's a bit of DIYish, but if ssh is already configured there's no need to open any ports. Maybe this would work, from command line: cat yourfile.pdf | ssh user@yourubuntumachine lpr But maybe there's a quicker way... Let's see what others say.


2

Yes, the ever-popular PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/) is available through the repositories. To install it run: sudo apt-get install putty To set up tunneling it is quite easy. Open PuTTY Enter the IP address of the server you want to tunnel to (where 255.255.255.255 is in the image) After entering the IP address, click on ...


2

You can use sshuttle as described in How do I route my internet through a SSH tunnel?


1

Have you tried ifup/ifdown? ifup he-ipv6 ifdown he-ipv6


1

I had a similar issue when I tunneled using ssh in GNU/Linux. I don't know if it's related, but in the end the effect is the same, I couldn't find any answers on the net and this was the top search result so I decided to contribute with my solution. In my case I was running this: ssh -C2qTnN -D 127.0.0.1:3128 user@remote.host to open a SOCKS tunnel proxy ...


1

Start by setting up required key authentication and disable use of passwords in sshd. The most common attack on Internet attached ssh daemons are password brute force attacks. The simplest way to counter such an attack is disabling passwords for sshd. Check your /etc/ssh/sshd_config for the following settings: PermitRootLogin no PubkeyAuthentication yes ...


1

It is not really clear from your question what you are trying to do and what problem you are having. When you say "webmin http tunnel will allow access to outside webpages, but cannot access any addresses on the same network." it is ambiguous what 'same network' means and how you are trying to access (host name, ip address). I can not determine if your ...


1

For ubuntu 11.10+, the package "gstm" does OK at providing an easier way to set up the tunnel. see http://linuxers.org/article/manage-your-ssh-tunnel-redirects-graphically-using-gnome-ssh-tunnel-manager


1

I was having the same issues with /etc/rc.local not being persistent through reboots Upstart is a good solution and this works for me: # location: /etc/init/tunnel.conf description "persistent ssh tunnel through reboots" author "morgan mcdaris <morganmcdaris@gmail.com>" start on (local-filesystems and net-device-up IFACE=eth0) stop on runlevel ...



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