how to add / bind ip addresses to one box on slackware ?
I have slackware box and my ISP gave me 16 ip addresses to use for my box.
wondering how to bind multi ip addresses on the slackware so http server can use one ip and other service can use one diff ip. Thanks. Mouse |
U can do an alias
ifconfig --help shoud give you some idea. |
For example:
ifconfig eth0:1 192.168.1.34 |
I have a server that I run that hosts multiple IPs and this is how I bind the IP addresses to my server. Since I only have one ethernet card, I have to create virtual hosts on eth0.
You can use ifconfig to add them to your network. In my /etc/rc.d/rc.local, I have the following (so it starts up and adds them everytime): /sbin/ifconfig eth0:0 <ip> netmask <netmask> up /sbin/ifconfig eth0:1 <ip> netmask <netmask> up /sbin/ifconfig eth0:2 <ip> netmask <netmask> up /sbin/ifconfig eth0:3 <ip> netmask <netmask> up Where <ip> and <netmask> are the IP and netmask, respectively. |
All times are GMT -5. The time now is 03:05 PM. |