New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
How to add a new IP (/32 block) to a server
a-super-random-user
Member
in Help
Recently I've ordered a new IP for my dedi box from my provider. After receiving it, I've added it to /etc/sysconfing/network-scripts as eth0:1
But even after restarting my network interface, I cant ping it from outside (Pingable from inside of the box)
Here is my eth0:1 config file content
DEVICE=eth0 :1
BOOTPROTO=none
ONBOOT=yes
NETWORK=a.b.c.d
NETMASK=255.255.255.255
IPADDR=a.b.c.d
What could possibly goes wrong here.
(OS - CentOS 6)
(Sorry for my bad english)
Comments
Install debian save 3 hours on average
The problem is, it needs cPanel. So no debian for me.
Are you sure it's a /32 block instead of a single IP from a larger block (say /26)?
Try adding broadcast and gateway values and try again.
If you are using cPanel it can add the IPs for you if you give it the information
They've said it's /32. I've tried several times using same values and different values. But no luck
I've tried it. No luck
Then something must be wrong with the way you are entering it or with what you have been given.
Have you tried pinging the gateway IP from inside your server?
Yes. I've tried. It can be pinged from inside. But cannot be pinged from outside.
Here's how I added ip address
Navigated to > Home »IP Functions »Add a New IP Address
Entered new IP (199.2x.x.x) and marked subnet as 255.255.255.255
Then click "submit" (I've rebuilt the IP address pool also)
ipconfig eth0 199.204.187.160/32 up
This is what I use on my CentOS 6 servers and it works correctly. If it's not working for you then contact your data center for help.
Yes I can ping it using "ping 255.255.255.255 -b"
That's not a real IP (well it is, but not for you it isn't). Try to ping the gateway.
@Kuljoe -
Here is the netstat -r output. It seems like everything is configured from the inside.
Here is the ping result
After adding this, my server connection did failed. (ifconfig eth0 x.x.x.x/32) I can't even ping my main IP address.
What did your provider say when you opened a ticket?
I just realized you said a /32, are you 100% sure your provider gave you a /32 and not a /30?
They've said they do not support Unmanaged dedicated servers. Tough luck
AFAIK, It's all set
Still can't figure out what's wrong.
So it's working? Can you paste your ipconfig here for us so we can see what the problem was?
No it still not working. I've tried proxies and vpn's also. (I'm using OpenDNS) but still cant ping it from outside.
This. If this isn't working, then contact the DC.
@MarkTurner
I've opened them a ticket. Seems like something bit off with my IP. It should be working now.
The reason why it doesn't work is because the additional /32 you've got is most likely not on the same network as your default gateway.
Try something like this
DEVICE="eth0:1" BOOTPROTO=static ONBOOT=yes TYPE="Ethernet" IPADDR=199.204.187.160 NETMASK=255.255.255.255 GATEWAY=199.204.186.62 NETWORK=199.204.186.0
If this doesn't work, you probably have to use the route commands (or whatever they use in CentOS) to make sure the IP address knows its gateway.
What is the output of:
Probably best to PM me as publishing your IPs is one sure way to get attacked.
/32 is normal for individual IPs. No gateway should be set.
That will stop his networking working. It will dump the default route too.
Yeah. It did. I had to login using iLO interface.
iptables was the culprit
Thank you @Mark for helping me out. Even after two flushes it was the problem all along.