How to transparently tunnel a local device to appear from a remote address?

خرید بک لینک

I'm looking for help with a networking problem. Unfortunately I only know the bare minimum in this area and am not even sure I've been using the correct terminology for what I want to do, so I've run into a bit of a dead end while searching for answers.

Basically I need to access a remote service over the inteet - for purposes of explaining the situation let's call it "X". This is a private service that involves a range of IP addresses and ports, and for security purposes only allows access from white-listed IPs.

I have a server (let's call it "S") running Debian Linux which has been white-listed, and I often use openssh with the -D option to create a SOCKS proxy to browse web pages on X from my computer "C" via S. C (also running Linux, but sometimes Windows 7) is on a local network with a router running OpenWRT ("R"). R has local address 192.168.1.1 and C has 192.168.1.2

Now comes the tricky part - I have an embedded device on the local network ("D", with IP 192.168.1.3). Unfortunately this device needs to access various IPs and ports from X but has no understanding of SOCKS or other proxies/VPNs at all. Is there a way I can route the requests from D through my server S so that it appears to have S's white-listed IP, but without being able to specifically tell D to use a proxy or VPN?

One other problem - the router R has basically no space available to install extra OpenWRT packages, so any method will have to rely on the default software only, which does not include the full openssh client (it uses dropbear instead). This (probably) also rules out a transparent VPN based solution, I think.

(I did manage to install the "ip" tool from the iproute2 package and the keel modules needed for ipip tunneling when trying to figure this out though).

The fact that the device needs to access a range of IPs and ports seems to rule out most of the more simple and straight-forward SSH-based tuneling answers I've come across on this site and others. I've looked into the above mentioned ipip tunneling, and also SSH tunneling with the -w option, but so far have not managed to make anything work.

The solution could involve somehow setting up the router to forward traffic from the device to X via the server S, or if the default OpenWRT tools aren't sufficient maybe I could somehow use my computer as a gateway to X via S and tell the router to pass traffic from the device via the computer. If it's easier it would also be acceptable to have all traffic from the local network be sent via S and appear to X (and the rest of the inteet) as coming from it's (S's) IP address.

I'm definitely in over my head with this, so any help would be greatly appreciated!

Thanks in advance, SB

Recent Questions...

ما را در سایت Recent Questions دنبال می‌کنید

برچسب: نویسنده: استخدام کار بازدید: 218 تاريخ: يکشنبه 30 خرداد 1395 ساعت: 1:55

صفحه بندی