Best method for both local and remote access to web server?

Discussion in 'Installation/Configuration' started by Eviang, Sep 18, 2010.

  1. Eviang

    Eviang New Member

    Hi all,

    I have a Linux Server that I've managed to setup using the CentOS perfect guide. It has two NICs each one with a public static IP address but it's outside my network and when I'm developing a web site, I have lots of waiting times each time a file is compared, uploaded or downloaded.

    Is there any way of "sharing" the server between my LAN using one NIC and the outside world using the second NIC?

    For example, tell my FTP program to connect to (LAN address) but have the possibility to see the websites from the outside using either an IP address or domain name?

    I've done it before with Windows Servers and I think it's very doable with Linux... just don't know how.

    BTW all my sites are backed up so I don't mind formatting and installing the server all over again.

  2. Boogey

    Boogey New Member


    You can do this by configure your network interfaces manually without a gateway on the lan interface. I am no centos expert but it must be something like this.

    1. Set up WAN NIC.
    edit /etc/sysconfig/network-scripts/ifcfg-eth0
    should looks like:

    IPADDR=aa.aa.aa.aa # e.g. # e.g. # e.g.

    Set up LAN NIC. This step requires operations similar to previous step.

    Edit /etc/sysconfig/network-scripts/ifcfg-eth1 and make sure that it looks like:

    BOOTPROTO=static # e.g.
    NETMASK=dd.dd.dd.dd # e.g.

    Afterwards you have to restart the network:

    /etc/init.d/network restart

    check your config
    Last edited: Sep 20, 2010

Share This Page