Right, so I've got something set up on my computer which needs a port open. To open a port, you have to assign it to a specific internal IP address, like this...
Only problem is, whenever I reboot my computer, it will assign it a different internal IP address which doesn't match with the configuration which you can see above. I then have to go into the router configuration and then change the IP address which is in the box.
This gets freakin' annoying.
So, is there any way to force the use of the same internal IP address all the time?
Comments
Like; Start IP 192.168.1.2 End Ip 192.168.1.2
or you can go into Windows Adaptor setting and set static IP.
I have disabled DHCP on my router and set Internal IP manually and then opened the port using Virtual Servers.
There are two ways around this. The complicated way, were you tell the DHCP server to always reserve the one IP address to a certain MAC address or the easy way, tell the DHCP server to never give out a certain range of IP addresses and then, instead of asking the server for a free IP, assign yourself one. This is called a static IP address.
The way I have it set up is so that the DHCP server (my router) only gives out addresses above 192.168.0.10. Then I say to my network card, you're IP address is 192.168.0.3 with:
Which says, interface eth0 has the IP address 192.168.0.3 and it's subnet is in the 192.168.0 domain (that's the subnet mask bit - it's a logical AND with your IP address). Then I say, all traffic goes through 192.168.0.1 (my default gateway).
The details of how to do this on boot differ between operating systems but on a linux machine, that's how you would do it while the system is up. To request an IP address using DHCP you can type:
And that will sort everything out for you, but, like we mentioned at the beginning, this won't get you a static IP.
Also, this might be of interest. You can edit your hosts file (/etc/hosts on linux) of any other computers you may have so that you can type in the name of your computer instead of 192.168.0.3. For example, my host's file:
Skynet and Terminator are our to routers.