Connect to SSH in same network - networking

I have server with vpn network, raspberry pi and my pc.
For some internet provider reasons, I can't access remotly my raspberrypi, opening ports don't work correctly.
So I decided to connect my PC to same network with vpn. I can access ssh of my raspberrypi from server, but can't from my pc.
Is it possible to access this device with my PC, if I am connected to this vpn network on my server too?

Adding option client-to-client in server.conf in openvpn make work as expected.

Adding option client-to-client in server.conf in openvpn make work as
expected.
Does it worked ?
On my side , client-to-client is not enough, and no more when I add topology subnet too.

Related

port forwarding to a virtual machine using Virtualbox

I want to forward a port to a VM. However i dont want the VM to be behind my host PC, i want it to be connected directly to the router so that packets coming on that port go directly to the VM without passing through my host PC.
In other words, i want the VM to look like any other machine on the network.
EDIT: i used bridged adapter, but i couldnt make it connect to the network.
Thank you
The VM will use the Ethernet port in all cases and the OS in it.
Typically if you have Windows and a VM with a bridged port, you will see the traffic flow when you take a capture on the Windows machine. IP won't be the one from the Windows machine but the traffic, like said, will flow through the same physical interface.
Secondly, you need to use a bridged adapter. For the details you can find help here: Bridged networking not working in Virtualbox under Windows 10

VPN server and client (possibly) on the same machine

What I'm trying to achieve is:
Connect to a VPN as client and route all my internal network's traffic over the VPN.
Run a VPN server, so that people from outside can connect to my internal network and get routed over the a.m. VPN client.
I'm trying to achieve that with a router running dd-wrt (netgear D6200), and / or a raspberry pi.
Can someone tell me if this can be achieved, and if, direct me to what would be a possible solution?
(I'm not looking for a tutorial, just a direction)
Thanks!
This thread probably does not belong here.
Consider using OpenWRT instead of dd-wrt. OpenWRT gives you a usable build system and easier to customize and build. I am not advocating OpenWRT. This can be a stop gap measure.
You can setup a OpenVPN server and OpenVPN client using the standard
documentation available on OpenWRT Wiki and also OpenVPN site.
Add to OpenVPN server.conf the following directive redirect-gateway def1. This will push the default gateway to clients connecting to OpenVPN server. Further, make sure you are using a unique network IP pool for VPN clients and does not clash with the remove VPN server.
Make sure you are masquerading the VPN traffic (Clients of local VPN server) before forwarding to remove VPN server. This can be tricky as this interface does not exist at boot time. It needs to be configured using up and down scripts
Make sure you are allowing traffic (clients of local VPN Server) on VPN interface to be forwarded in your firewall rules
Before setting up the OpenVPN server, make sure
The remove VPN server is pushing the default gateway to your VPN
client
You have setup the firewall correctly
You are able to reach the cloud through the Remote VPN Server. Checking with some site like www.whatismyip.com will help
Yes this is possible with dd-wrt on Netgear.
There is no need of Raspberry (unless you meant to run the remote VPN server on it).
Configure and run VPN server on dd-wrt - and try connectivity by connecting clients. Both tun/tap should work in general (with VPN client running). I tested with tun.
Configure and run VPN client on dd-wrt and try connecting to your VPN server. By default, the router should start directing all traffic (for its own LAN clients) via the VPN server.
So far so good.
The problem comes when you want dd-wrt's VPN clients (and not just LAN clients) to take the same route. With a VPN client running on dd-wrt, dd-wrt's own VPN clients will not be able to connect to the VPN server running on dd-wrt as such. To make it work, see below.
This is only possible via PBR - i.e. you run VPN client on dd-wrt, but take the router itself off this client, and route only specific clients through this VPN client running on dd-wrt.
With some tweaks using subnet masks, it is possible to include all your LAN and VPN IPs in the PBR policy so that everything (except the router itself) routes through the remote VPN server.
The key is to include dd-wrt's VPN clients' virtual IPs in the PBR. While configuring VPN server on dd-wrt, there is a field for specifying the clients' network and netmask.
If you use this network IP and netmask in client process's PBR policy, your (dd-wrt's) VPN clients will be able to connect to the VPN server running on dd-wrt, and will in turn be routed through the remote VPN server to which dd-wrt is connected as a client.

How to connect X-Lite softphone from host to guest vm with asterisk?

I am desperate. I've install asterisk on vm 1 (centos) and opensips on vm2(centos), and everything works well so far. Now I need to connect softphone from host to vm1 (to make a call (I'm traying to set up auto-dial out system))) and don't know how to. I use host-only networking between vm's
vm1 - 192.168.56.3
vm2 - 192.168.56.4
host - I've set up rule in firewall, to make traffic enabled between vm's and host, but can't ping from guest to host/ host to guest.
Simplest way - use bridged network to your router.
But host-only also work ok(at least in vmware and virtualbox), check your firewall rules

Open website via computer IP address while running tomcat locally with a router?

I'm working on a website for a friend, developing using Eclipse/Tomcat. I'm running it locally and trying to open it via my internet port IP address, but I can't get it to work. The computer I am running it from is connected to a router, so it is running off of 192.168.1.4, and http://192.168.1.4:8080/Mobile_Site/index.jsp works. However when I try and open it via my internet port IP, http://67.xxx.244.xx:8080/Mobile_Site/index.jsp it doesn't find it from any device, even outside my local network. Is there a way to send the link when running locally when connected to a router?
You have to configure your router port forwarding (or virtual servers depending on the router) to forward TCP connections from 67.xxx.244.xx:NNNN to 192.168.1.4:8080.
Then you give the 67.xxx.244.xx:NNNN address to your friend.
Note: NNNN at your router doesn't need to be 8080, as long as the port forwarding is set properly.

How do I connect to a local server run by Aptana from an outside network?

I have a rails server that i run from Aptana Studio. I normally connect to it via localhost:300, and everyone on the network connects to it via stonecrab:3000 (stonecrab is the name of my computer). However, how do I allow people from outside the local network to connect to the server? For instance, if the IP of my internet connection is 123.456.7.8, what URL can someone use in a web browser to connect to my server? I have a linksys e1000 router and i can access it if i need to change any settings.
Thanks
By default, your machine will not be accessible from behind the router. You need to enable port forwarding in your router. You need to tell your router to forward port 3000 to the IP of stonecrab. Then you will use 123.456.7.8:3000 to access stonecrabe:3000 from outside the LAN.

Resources