How to go around a modem's port forwarding incapabilities

2

1

This custom cable modem my ISP gave to me does not support forwarding an external port to a different internal port. (For example, I can't forward an incoming connection on port 80 to port 3389 on my main box and and an incoming connection on port 21 to port 3389 on my old box. I need to do this to avoid port blocking.)

I know I could go around this by changing the port of RDP on my machines but I can't because I already have an HTTP server which must run on 80 for internal testing purposes.

I could not find any software updates, I could not get any support from my ISP and I could not find any better cable modems. (Cable modems are very uncommmon compared to ADSL modems.)

So is there any way I can go around this limitation?

AlicanC

Posted 2012-02-02T22:40:50.307

Reputation: 123

Can you put your own router and switch in between your computers and the modem? – Shane Wealti – 2012-02-02T22:43:22.663

How will that work? I don't know how to setup such a network. I have a Linksys WAG160N which was my old ADSL modem. Could that work? – AlicanC – 2012-02-02T23:04:30.433

1shane is kind of right.. If you put something in the middle, the thing should be a Plain Router, not a Modem/Router device(i.e. not a router with modem built in). A plain Router instead of an adsl modem built in, has an ethernet socket labelled WAN, and that's where you use a cat5 cable to connect your modem to it. – barlop – 2012-02-02T23:23:54.893

Actually you can possibly use an adsl router for that. You use a cat5 cable to connect the modem to a regular port on your modem/router. – barlop – 2012-02-02T23:25:10.510

My old ADSL modem doesn't have it. (Because why would I connect another modem to it right? :P) So should I get something like Linksys E1200? – AlicanC – 2012-02-02T23:29:24.037

@AlicanC: I've yet to see an ADSL modem that does not have an Ethernet port... – user1686 – 2012-02-03T00:44:28.340

@grawity, I meant the WAN port. – AlicanC – 2012-02-03T11:32:43.497

Answers

1

Use one computer as a port-translating relay. Configure the router to forward all required ports (unchanged) to that computer.

Use something like socat to bounce the connection over to a different port on the other computer as needed.

example

 socat TCP4-LISTEN:80 TCP4:otherpc:3389

Update: Grawity points out below that using Windows you can do something like

c:\>netsh
netsh>interface portproxy
netsh interface portproxy>add v4tov4 listenport=80 connectaddress=192.168.0.100 connectport=3389 protocol=tcp

See Microsoft Technet

RedGrittyBrick

Posted 2012-02-02T22:40:50.307

Reputation: 70 632

1FWIW, Windows has such a feature built in -- via netsh interface portproxy IIRC. – user1686 – 2012-02-02T23:56:14.110

Looks like a great short-time solution since I'm worried about performance and the power bill of running a computer 24/7 to make everything else work. – AlicanC – 2012-02-03T00:27:04.137

you can run it on a really small netbook.. or similar embedded system that uses like 10watts.. – Piotr Kula – 2012-02-03T11:22:22.577

1

… like on a 3.5W (5V x 700 mA) $25 Raspberry pi B maybe?

– RedGrittyBrick – 2012-02-03T18:18:02.150