Knowledgebase
Server, router, and accessing services from inside of company lan ?
Posted by Cameleon, 10-11-2013, 10:21 AM | Server eth0 (static IP configuration for ISP)
Ip 89.xx.xx.xx, Under domain: test.com
Server eth1 has been set to Ip 192.168.0.1
Server eth0 got masquerade to pass Internet to eth1 to router.
Router connected to eth1 has Ip 192.168.0.2
Server eth0 pass connections on port 8081 to eth1 > router
DHCP for lan computers has been set at begining to 192.168.102.1
First computer in my internal lan has 192.168.102.2 and it serve IIS on port 8081
Router pass 8081 to 192.168.102.2
I can access server domain.com under 8081 port (from outside) and access this computer, but now i need to configure /linux server?/ so it will allow accessing domain.com:8081 from inside of my company.
I can't use host's file in Windows because it does not accept ports.
How to solve it ?
|
Posted by GreenHornet, 10-11-2013, 11:15 AM | 1.Set the record in the hosts file to 127.0.0.1 xyz.com
2.Configure your machine for virtual hosts.
3.For the virtual host you setup for xyz.com, create an html file that redirects to localhost:8081
Seems to be a fair bit of work, but it would accomplish what you're asking.
Another way could be using reverse proxy, like nginx -
server {
listen xyz.com:80;
server_name xyz.com;
location / {
proxy_pass 127.0.0.1:8081;
}
}
Easier it will be if you have access to the application that listen on port 8081 and re-configure it to listen on 80 for a while.
|
Posted by Cameleon, 10-11-2013, 12:37 PM | Your solutions are bit far way around, v hosts solution is nice i didn't think of that - but still i would configure every computer on my lan that way, bit problematic. is it no possible to do it with lan way ?.
olso i can't switch to 80 port, because my linux server has apache and that would block normal apache.
|
Posted by Cameleon, 10-14-2013, 05:17 AM | really no other way ?
|
Posted by jzukerman, 10-14-2013, 08:49 AM | Why are you double NAT'ing? Makes this very complicated when it doesn't need to be. Just hang everything off the router, and portforward the ports to the server you need off the router. No need to do double NAT.
|
|
Add to Favourites
Print this Article |
Also Read
Data lost (Views: 623)
Net Logistics (Views: 592)