Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a lot of servers running under my localhost (127.0.0.1), and I also my vhosts file creating some neat aliases.

But unfortunately I can't access it outside my computer, like for testing on other devices under my network.

Is there any way to redirect the call to my IP like 192.168.1.4 to my localhost?

Thanks in advance

share|improve this question
    
You do understand that 192.168.1.4 is a local network ip address not your public ip address right? –  Ramhound Jan 4 '12 at 14:13
    
Yes, just want to it to be public for my network ;) –  zanona Jan 4 '12 at 17:11
1  
Can you not configure the server to listen on 192.168.1.4? (example) –  RedGrittyBrick Jan 4 '12 at 17:38
    
Unfortunately not, sorry :( –  zanona Jan 5 '12 at 14:40

1 Answer 1

You need something that will forward incoming traffic to the machine running all the servers on localhost. You can:

  • use a proxy server
  • if any of the servers are web servers, use the "reverse proxying" features of Apache or similar web servers
  • use software that creates a tunnel - OpenVPN, or various other small programs that basically do nothing but forward traffic
  • if this is a linux system and you are looking for an extremely quick and dirty solution to this problem (but it isn't robust), look into rinetd
  • create IP tables rules that forward certain ports from externally accessible IPs to 127.0.0.1 and back.
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.