Koozali.org: home of the SME Server

Extra external ip address

Darren

Extra external ip address
« on: April 17, 2002, 07:02:37 AM »
I am using a static ip address and they are changing my ip address i know about propagation and i know i can't just change the ip address and wait for it to propogate i need to temporaly give my server 2 external ip addresses
how do i do this.
i will have 2 ip addresses for 2 weeks and the server has to stay up i can reboot but i can't have more than 1 hour off the web.

any help i would be very greatfull

Jon Blakely

Re: Extra external ip address
« Reply #1 on: April 17, 2002, 10:33:58 AM »

Darren

Re: Extra external ip address
« Reply #2 on: April 17, 2002, 01:43:28 PM »
OK so i have created a template for /etc/sysconfig/network/scripts/ifcfg-eth1:1
and added to the httpd.conf templates
it picks up the ip address now i have 1 virtual domain will it still work if it goes to the second ip address
and will the mail as well for either

Darren

Re: Extra external ip address
« Reply #3 on: April 19, 2002, 07:18:23 AM »
Don't worry i have worked it out

If you want to know what i did

i created custom template of the /etc/sysconfig/network-scripts/ifcfg-eth1:1
and set the info i needed

DEVICE=eth1:1
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
IPADDR=209.96.169.54
NETMASK=255.255.255.252
NETWORK=209.96.169.52
BROADCAST=209.96.169.55

then i added 2 custom files to the httpd.conf file
1 is the 35Listen81
which has in it

Listen 209.96.169.54:80


and
80Aliases01
which i took the information from the httpd.conf and changed it with the new
ipaddresses
i.e


NameVirtualHost 209.96.169.54:80



    ServerName www.aserver.com
    ServerAlias aserver.com
etc.. including the virtual domains
rebooted the server and the server accepts both ip addresses on both domains
inc virtual domains

it sounds a bit messy but i only need it to work for 1 week

cheers any way

Ruusvuu

Re: Extra external ip address
« Reply #4 on: May 16, 2002, 12:29:25 AM »
Darren!

Would you be so kind as to describe what to do with which files (where to create new files, their names, etc.)?

I need to have multiple IP's on my webserver SME 5.1.2 for e-commerce situations.

Many thanks,

Ruusvuu

darren

Re: Extra external ip address
« Reply #5 on: May 21, 2002, 09:33:28 AM »
Please Read MASQ Part Before trying this


mkdir /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth1:1
pico /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth1:1/template-begin

DEVICE=eth1:1                    
#(increment the :1 to :2 , :3 on extra ips)
USERCTL=no
ONBOOT=yes
BOOTPROTO=none
IPADDR=(New IP Address)
NETMASK=255.255.255.252
NETWORK=(your network address)
BROADCAST=(your broadcast Address)


pico /etc/e-smith/templates-custom/etc/sysconfig/network-scripts/ifcfg-eth1:1/template-end

# template end


/sbin/e-smith/expand-template etc/sysconfig/network-scripts/ifcfg-eth1:1/

then i added 2 custom files to the httpd.conf file

pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/35Listen81

Listen (NEWIPADDRESS):80
Listen (NEWIPADDRESS):443



pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/80Aliases01

which i took the information from the httpd.conf and changed it with the new
ipaddresses
i.e

NameVirtualHost (NEWIPADDRESS):80

ServerName www.aserver.com
ServerAlias aserver.com
 
# primary content

    DocumentRoot         /home/e-smith/files/primary/html
    ScriptAlias /cgi-bin /home/e-smith/files/primary/cgi-bin
    Alias       /files   /home/e-smith/files/primary/files

    # A VIRTUAL SERVER

ScriptAlias /(VIRTUALNAME)/cgi-bin /home/e-smith/files/ibays/(VIRTUALNAME)/cgi-bin
Alias       /(VIRTUALNAME)/files   /home/e-smith/files/ibays/(VIRTUALNAME)/files
Alias       /(VIRTUALNAME)         /home/e-smith/files/ibays/(VIRTUALNAME)/html



NameVirtualHost (NEWIPADDRESS):443

ServerName www.aserver.com
ServerAlias aserver.com
 
# primary content

    DocumentRoot         /home/e-smith/files/primary/html
    ScriptAlias /cgi-bin /home/e-smith/files/primary/cgi-bin
    Alias       /files   /home/e-smith/files/primary/files

    # A VIRTUAL SERVER

ScriptAlias /(VIRTUALNAME)/cgi-bin /home/e-smith/files/ibays/(VIRTUALNAME)/cgi-bin
Alias       /(VIRTUALNAME)/files   /home/e-smith/files/ibays/(VIRTUALNAME)/files
Alias       /(VIRTUALNAME)         /home/e-smith/files/ibays/(VIRTUALNAME)/html




/sbin/e-smith/expand-template /etc/httpd/conf/httpd.conf

last you have to change the /etc/rc.d/init.d/masq  file
now what i did was just change the masq file where the
OUTERNET = (Current ip address)
i added
OUTERNET1 = (NEW IP ADDRESS)

then copied all lines where there is a OUTERNET and had the same line with OUTHERNET1

i.e
/sbin/ipchains -A input -p tcp -s 0/0 -d $OUTERNET 113 -j ACCEPT
/sbin/ipchains -A input -p udp -s 0/0 -d $OUTERNET 113 -j ACCEPT

/sbin/ipchains -A input -p tcp -s 0/0 -d $OUTERNET1 113 -j ACCEPT
/sbin/ipchains -A input -p udp -s 0/0 -d $OUTERNET1 113 -j ACCEPT



rebooted the server and the server accepts both ip addresses on both domains
inc virtual domains

i Hope This Works For YOU!

Ruusvuu

Re: Extra external ip address
« Reply #6 on: May 21, 2002, 10:28:30 AM »
Darren!

Thanks for the How-To, but where do I find this:

"Please Read MASQ Part Before trying this"?

Thanks