Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 18th September 2010, 21:44
Eviang Eviang is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
Default Best method for both local and remote access to web server?

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 http://192.168.0.100 (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.

Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 20th September 2010, 22:30
Boogey Boogey is offline
Junior Member
 
Join Date: May 2010
Location: Belgium
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Boogey
 
Default

Hi

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:

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=aa.aa.aa.aa # e.g. 123.45.67.89
NETMASK=bb.bb.bb.bb # e.g. 255.255.255.0
GATEWAY=ee.ee.ee.ee # e.g. 123.45.67.1
TYPE=Ethernet


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:

DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=cc.cc.cc.cc # e.g. 192.168.0.100
NETMASK=dd.dd.dd.dd # e.g. 255.255.255.0
NETWORK=192.168.0.0
BROADCAST=192.168.0.255
TYPE=Ethernet

Afterwards you have to restart the network:

/etc/init.d/network restart

check your config
ifconfig

Last edited by Boogey; 20th September 2010 at 22:37.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos5.4/ISPConfig 3--Virtual site not working MichaelCaditz Installation/Configuration 25 25th March 2011 12:37
Can't Ping over VPN RoMiONeT Server Operation 2 4th July 2010 01:19
problem with upgrade to 2.2.34 brianetilley Installation/Configuration 14 11th November 2009 18:22
Exim Gateway with mailwatch (Unable to receive emails) siul0_0 HOWTO-Related Questions 10 9th May 2009 00:00
Can't start apache Musty Server Operation 12 9th March 2008 14:58


All times are GMT +2. The time now is 09:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.