FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
+1 vote
1,730 views 2 comments
by

Hello,

I want to use RUT230 to reach, through an ssh over wan, a linuxbox (in LAN) behind that router included in my VPN. I've uploaded the .ovpn certificate generated by my VPN server to the RUT230. In this way I can correctly reach the RUT230 inside my VPN environment (both configuration web page and/or ssh session works to the router), RUT230 VPN address is 1.1.1.3. Next step is to reach the remote device behind RUT230 through a ssh session. That device has the local ip address: 192.168.1.2 and RUT230 is configured with the local 192.168.1.1 (LAN). Inside the RUT230 I've added a new port forwarding rule such:

ssh    

TCP, UDP

From any host in vpn

To any router IP at port 2222

Forward to IP 192.168.1.2, port 22 in lan

now if I try the command, from a whatever machine included in my VPN: ssh user@1.1.1.3 -p 2222

returns the following error: ssh: connect to host 1.1.1.3 port 2222: Connection refused

A double jump: 

first to the server ssh root@1.1.13 and then to the linux box ssh user@192.168.1.2 

anyway allows me to reach the linuxbox.

Can you help me?

1 Answer

0 votes
by anonymous

Hi,

Tested this configuration and it works basically without any additional settings. All I needed was to add the necessary routes in the OpenVPN server's config:

The routes help define that wherever your connection from is considered "from vpn". But in your case it doesn't look like routing issue. "Connection refused" usually means the end host's (linuxbox) firewall is not accepting the connection. Are all the firewall settings in order on the linuxbox?

by anonymous

Ok, but on my RUT230 I don't have the menù you've posted. I use the "Enable OpenVPN config from file" option available under the "Service -> OpenVPN" menù. I think you've suggeted the right solution but I can't find where to define the routes. Furthremore I can't see the push option.

OpenVPN Instance: Client_FE01

Main Settings
Uploaded File (2.47 KB)

by anonymous

You would have to modify the server config for the optimal option, but if the server is not under your control, you can try adding this line to the ovpn config file:

  • route 192.168.1.0 255.255.255.0
Then upload the file again to the RUT230.

However, this works me, but reading your description again, I'm not sure I get the full picture. If it doesn't work for you, could perhaps draw and share the topology for this case?