Tag Info

Hot answers tagged

7

Using ssh is the easiest solution. ssh -g -L 8001:localhost:8000 -f -N user@remote-server.com This forwards the local port 8001 on your workstation to the localhost address on remote-server.com port 8000. -g means allow other clients on my network to connect to port 8001 on my workstation. Otherwise only local clients on your workstation can connect ...


6

What you're looking for is called "ssh multi-hop". It is quite possible to do this transparently, using the ProxyCommand directive in .ssh/config (or an equivalent config option in PuTTY, or what-have-you): Host linux-server-b ProxyCommand ssh -q linux-server-a nc -q0 linux-server-b 22 What this does, when you try to connect to linux-server-b: opens ...


5

It's not always "tunnel". TUN/TAP is just specific NIC drivers. From point of view of network stack they acts as any other network interfaces: they can have IP addresses, can be point-to-point or broadcast interfaces. Routing rules also applies to them. But all traffic that gets written to one of that network interfaces goes to some userspace program for ...


5

I don't know if that's what you're looking for, but you can use ssh -D4545 domain.com to open a socks proxy tunnel at port 4545 to the desired machine from your computer. You can then set up that proxy in your application (say Firefox) and use a plugin to quickly engage and disengage the proxy settings (something like TorButton). There is one drawback ...


5

You would have to have them on unique ports. You can't have two applications listening simultaneously on a single port. So, in your example, because tunnels 1 and 2 both have an end on Site A, those endpoints must have unique ports. Hence the use of ports 1194, and 1195. Now, because the VPN links 1 and 2 are using unique ports 1194 and 1195 on A->B, and ...


5

That's a tricky thing to get done. Your best bet is to use some SOCKS redirector like socksify or redsocks, but none will give you what a VPN can, so you'd better set it up. VPN allows you to connect even whole networks, forward your traffic through secure channels, make your computers all appear as in one LAN and so on. You can use OpenVPN to do that - ...


3

As @slm has already written, a TUN interface is a software loopback that emulates a network interface the same as a TAP interface. In practical terms, a TUN interface is the emulation of a layer 3 interface. That is, it is a network layer emulation device that can tunnel data packets of varied nature, be it raw TCP, UDP, SCTP or encapsulated packets such as ...


3

It's for tunneling software. See the wikipedia article titled: TUN/TAP for full details. excerpt from FreeBSD tun man page The tun interface is a software loopback mechanism that can be loosely described as the network interface analog of the pty(4), that is, tun does for network interfaces what the pty(4) driver does for terminals. This socat ...


3

Try to run it via ssh socks proxy: echo 'Acquire::socks::proxy "socks://localhost:3128/";' | sudo tee -a /etc/apt/apt.conf ssh -CND localhost:3128 user@remote.host in another terminal session: sudo apt-get whatever you need


3

You can specify the interface through which to route traffic in the routing table: sudo route add <host.com> -interface <ppp0> Where host.com is the hostname or ip that you want to access through the interface, and ppp0 is the link identifier for your vpn shown with the ifconfig command.


2

The problem is your (default changing) setting client=yes But you need stunnel in server mode, i.e. an SSL/TLS connection is offered to the outside and forwarded as an unencrypted connection.


2

Of course it's possible. The configuration you might want to try is tap rather than tun if you wonder about that, even though it might bit a bit harder to configure, it's easier to get hosts together in one network that way. You might need to enable client-to-client connections for that - there is a line for that commented out in example OpenVPN configs. ...


1

It appears I overlooked my iptables firewall, the problem doesn't appear to be with ip6tables but actually proto 41 being blocked which is required for 6in4 to work, I added the following to my csfpre.sh file: iptables -t filter -I INPUT -p 41 -j ACCEPT iptables -t filter -I OUTPUT -p 41 -j ACCEPT Connectivity appears to be maintained now.


1

There are a few things involved here. Output from the local box uses the OUTPUT table, not PREROUTING. PREROUTING is for traffic flowing through the box. The iptables rule only matches when a packet is sent. When the client opens a connection, it has to bind to an address before a single packet is generated. When it binds, it picks the source address ...


1

You need to enable the GatewayPorts feature in your sshd_config file. excerpt from sshd_config man page: GatewayPorts Specifies whether remote hosts are allowed to connect to ports forwarded for the client. By default, sshd(8) binds remote port forwardings to the loopback address. This prevents other remote hosts from ...


1

subnets of X and Y to go through this tunnel, without having to run the entire VPN solution that would send all my traffic through the server? What you want is the definition of a VPN. A VPN should not send all [your] traffic through the server? If it is, it is not setup properly. It is assumed that any machine your trying to get access ...


1

Disclaimer: I have not actually tested what I'm going to describe, and indeed it can be completely wrong, but your question is so intriguing that I cannot resist the temptation to draft an answer. :-) Also, the setup here depends on some iptables functionality that might exist only on Linux. Assuming you want to connect from your laptop to a specific port ...


1

There are different ways to achieve this. When using a SOCKS5 proxy (SSH Tunnel) you actually still leak some information. SSH is a stateful protocol which uses TCP, however DNS requests use the UDP protocol (stateless) which can't be sent over the SSH tunnel. I did a blog post on this once which you can find here. There are also other ways like tunneling ...


1

Determine the IP address of your tunnel interface with ifconfig or the ip addr command. Based on your routing table I would expect it to be 192.168.11.1. Additional tunnels would be 192.168.11.5, 192.168.11.9. You should also be able to determine this address from the client's routing table. Try using the IP address of the servers end of the tunnel in ...


1

I'm using Squid as proxy server and Stunnel as SSL wrapper. It has very good performance due to caching. Squid Configuration After installing Squid, follow Squid Documentations and configure it. Here is sample configuration: http_port 3193 transparent cache_dir ufs /var/cache/squid 128 16 128 cache_mem 1 MB maximum_object_size_in_memory 512 KB ...


1

I do something like this using OpenVPN. My laptop and cellphone can connect to my server at home using SSL over a TCP connection on port 443. This is really useful when I'm at stodgy places that don't let you use any ports besides 80 and 443. Here's a simple configuration that accomplishes this on the server: port 443 proto tcp dev tun server 10.44.3.0 ...


1

Is the https server apache? I don't fully understand your situation, but if you have mod_proxy, you might able to do what you want.


1

Well yes it is client sided. Plus there isn't any configuration in the traditional sense. You create a tunnel by specifying the correct parameters when connecting to a server. Sure you can store it in .bashrc, .ssh/config, or some other place for re-usability, but in general it is purely on-demand.


1

Here is further guesswork. Hope this is helpful, but it may as well be embarassingly wrong. tap0 has two ends, the kernel network stack end and the program interface. It seems to me if you supply 'nicserver' with tap0, it won't attach to it the way it is intended with tap devices, using the program interface. Instead, nicserver will simply write to it ...


1

Using the traditional nc is the easiest solution: nc -l -p 8001 -c "nc 127.0.0.1 8000" This version of nc is in the netcat-traditional package on Ubuntu. (You have to update-alternatives or call it nc.traditional.) Note that in contrast to ssh this is not encrypted. Keep that in mind if you use it outside one host.


1

Recent versions of OpenSSH support tun/tap network devices for true VPN support. See https://help.ubuntu.com/community/SSH_VPN for some basic documentation (obviously intended for Ubuntu, but the basic principle applies elsewhere.)



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