Networking 101 WAN IP and private IP
Alright, I recently just upgraded from humble Linux user to confused Linux admin of my own virtual Linux server. When I issue the ifconfig command I get following output.
Code:
venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 What I am trying to figure out, is it possible to assign a private IP address to the same interface or can I only have one IP address per interface. I understand I have a mask of /32 so I am not going to be able to subnet the address to create any more addresses, so I assume I am stuck with the WAN IP (public IP) that I have, and just need to deal with it. The reason I ask this is because I have been reading through several DNS/BIND tutorials/walk-throughs, and a lot of them specify setting up a intranet access with 192.168.1.1 address for the local DNS server, but since I am connecting to the sever via SSH I figure I do not need a private IP address. Any thoughts? |
What was your purpose for setting up bind ? ...
|
Quote:
|
Quote:
ifconfig interface add 192.168.1.1. 255.255.255.0 Assuming that your private network is 192.168.1.0 Note that this will disappear after a reboot, so make sure that you make the change permanent, if this is what you actually want. easiest way is to make a copy of the current interface file, e.g. ifcfg-eth0. Rename it to ifcfg-eth0:0 and then change the device name to the file name and the ip address/netmask in ifcfg-eth0:0 to what you need. Hope this helps edit You probably want venet0:1 as you already have :0. Not familiar with your distro I'm afraid. Also, you'll only be able to access the private ip if you are already in that network 192.168.1.0 (or if there is routing/NATing to this network) |
As it's hosted you won't be able to use private addresses without a vpn of some kind, I'd just add an entry in c:\windows\system32\drivers\etc\hosts to ssh. To host a website you'll need a domain registered, most registrars will host the dns for you as well if requested.
|
Or use a dns service like dyndns, no-ip etc.... You don't need to set up BIND on your own server to do DNS you would really only do that on your own internal network.
|
All times are GMT -5. The time now is 03:13 AM. |