0

I have Windows server 2012 has One LAN with two IPs as follow

IP - Mask - Gateway

  1. 192.168.1.100 255.255.255.0 192.168.1.1
  2. 50.65.1.52 255.255.255.0 50.65.1.1

and the client 192.168.1.5 255.255.255.0 192.168.1.1

Router IP is 192.168.1.1

I need to access (file/print, remote desktop, IIS,ping) the server using the IP 50.65.1.52 without changing the client IP

By the way the second IP (50.65.1.52) is static (Real IP)

  • by access, do you mean, file/print, remote desktop, IIS? If the WAN router/firewall is setup correctly, it's likely a local firewall issue. What error messages do you get? – Tom Jul 30 '16 at 12:32
  • The firewall is off ,what do u mean by wan router setup? – Farahatology Jul 30 '16 at 12:48
  • 1
    Windows operating systems don't and can't use multiple default gateways. Your trying to solve this problem the wrong way. By the sounds of it, this is a hairpin NAT issues with your firewall and that's where you should be looking to solve the problem. – joeqwerty Jul 30 '16 at 15:36

1 Answers1

1

On your client machine, try adding the following route. I can't say that it will work but it would be what I would do.

At the command prompt with administrative privileges type in:

Route add 50.65.1.52 mask 255.255.255.255 192.168.1.100

Any traffic destined for 50.65.1.52 will be sent to your server. Your server should then know that it's itself. Let us know how you go.

-Sysadmin Guy

  • didn't work ,any ideas – Farahatology Jul 30 '16 at 13:12
  • 1
    A diagram would be good. You mentioned that the server has two IP addresses and connected to the same LAN. Is the Gateway 50.65.1.1 the same physical device as 192.168.1.1 but a different interface ? – Sysadmin Guy Jul 30 '16 at 13:19
  • 50.65.1.1 is different physical device – Farahatology Jul 30 '16 at 13:24
  • 1
    Can I ask what you are trying to do? Is this a test environment and you are trying to simulate an external IP access to the server ? Because in a real environment the client would be connecting directly to 192.168.1.100 and not the 50.65.1.52 address because it is on the same LAN. – Sysadmin Guy Jul 30 '16 at 13:32
  • I have web server For example runs a Wordpress web site ,it has one url and should be the IP 50.65.1.52 if you access it from the internet no problem but from the same network you can't you have to use the internet IP – Farahatology Jul 30 '16 at 13:36
  • Hi F, I think I am beginning to get the picture now. What is running the web site ? Is it IIS or Apache ? – Sysadmin Guy Jul 30 '16 at 13:40
  • Apache Tomcat 7 – Farahatology Jul 30 '16 at 13:50
  • OK. Can you check if the setting for Apache Tomcat is configured to listen on all IP addresses or at least add the 192.168.1.100 address as well. This might be why when you hit it with the 192.168.1.100 address it didn't work and that's why it only works on 50.65.1.52. This will save you a lot of network re-design. I am not an Apache expert but Googling Apache Tomcat IP address binding gives you articles on how to configure such things. – Sysadmin Guy Jul 30 '16 at 13:56
  • this is a network not Apache I have two different gateways ,I have to be able to Ping the IP first then I will see the Apache . – Farahatology Jul 30 '16 at 14:00
  • You're not going to get very good help with comments like "didn't work ,any ideas" @Farahatology - people need to know what happened when you tried. "didn't work" can cover anything from "no error message but it didn't work" to "error message and didn't work" (and maybe if you told us what the error message was we could fix the problem very quickly) to "a genie appeared and kicked your ass when you tried to make the changes". Knowing which one of those happened when it "didn't work" can be tremendously helpful. – Rob Moir Jul 30 '16 at 14:08
  • @RobM This is simple question doesn't have error message the computer reply or not so If you can help me with my problem you are welcome if not ???? – Farahatology Jul 30 '16 at 14:34
  • It sounds like a hairpin NAT configuration problem. – Tom Jul 30 '16 at 14:40
  • 1
    @Farahatology I _am_ trying to help you with your problem. Pretend just for a moment that none of us can actually see the computer you're having trouble with. Stupid idea I know, but just pretend for a second. Now if that were actually true then we wouldn't know that you were not getting an error message until you just mentioned that a moment ago. That will be useful information for people trying to fix your issue for you. Perhaps a little less trying to be a smartass on your part and a little more trying to think "what will help these people help me" might do well in the future? – Rob Moir Jul 30 '16 at 15:32