Set Static IP on Ubuntu LAMP? [INACTIVE]

BrazilFW 2.xhelp discussions in English.

Set Static IP on Ubuntu LAMP?

Mensagempor ss3vegeta » Ter Abr 07, 2009 2:05 pm

I have my BrazilFW up and running great. I currently have a WAMP system running through the DMZ without issue. I've decided to play around with a LAMP system to try and resolve some server performance issues. Anyway I'm new to Linux as an OS and I'm having difficulty figuring out the correct settings for a static IP. If you can help I would greatly appreciate it.

My BrazilFW:
local IP 192.168.0.1
DMZ:
Primary IP Address 10.0.1.1
and Netmask 255.255.255.0
(Optional) Secondary IP Address 10.0.2.1
and Netmask 255.255.255.0
(Optional) Tertiary IP Address 10.0.3.1
and Netmask 255.255.255.0

My WAMP is setup for a static IP of 10.0.1.2 (works well)

As for setting up the IP on the Ubuntu server here is what I've tried:
sudo bash
nano /etc/network/interfaces

Edit the file as follows:
Código: Selecionar todos
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
        address 10.0.1.3
        netmask 255.255.255.0
        network 192.168.0.1
        broadcast 192.168.0.255
        gateway 192.168.0.1


nano /etc/resolv.conf
Código: Selecionar todos
nameserver 192.168.0.1


Then I try to reload with:
/etc/init.d/networking force-reload
and I get the following error and the nic doesn't work:
Código: Selecionar todos
* Reconfiguring network interfaces...
SIOCADDRT: No such process
Failed to bring up eth0


Again any help is greatly appreciated.
ss3vegeta
 

Re: Set Static IP on Ubuntu LAMP?

Mensagempor bobbb » Ter Abr 07, 2009 3:03 pm

This is not really a BFW question and this is not really a Linux forum either but going on pure networking theory and presuming that both the LAMP and WAMP are not also routers also I would get my eth0 interface to look like this (however you get it to look like this):
Código: Selecionar todos
iface eth0 inet static
        address 10.0.1.3
        netmask 255.255.255.0
        network 10.0.1.0
        broadcast 10.0.1.255
        gateway 10.0.1.1
Your name server of nameserver 192.168.0.1 seems OK because 10.0.1.0/24 (Your L/WAMP network) will route all foreign IPs through 10.0.1.1 which is the same PC.

Now the networking concepts are correct (for any OS).

I have a tutorial for a Brazil Firewall DMZ: http://bonomo.info/coyote/dmz.php
This will not tell you how to configure Ubuntu or any other OS.
bobbb
 

Re: Set Static IP on Ubuntu LAMP?

Mensagempor ss3vegeta » Qua Abr 08, 2009 12:45 am

Thanks for the reply. I've tried posting on an Ubuntu help forum and I've been told it's an issue with my firewall/router. If I enter the configuration you suggest the /etc/init.d/networking force-reload reloads without error. However I can't seem to get access to the network. For example:
apt-get update -- fails
ping http://www.google.com -- all packets fail (any other ip does the same thing)
wget ... -- fails to connect
(all of these work perfectly if I use an IP address that isn't in my dmz)

Is there something else I need to do in Coyote to make this work?
When I check: /sbin/ifconfig everything shows up without issue, no errors, no drops...

I'm guessing I must be missing something I need to do on brazilFW to make this work?

Is there an alternative way to place a reservation on the MAC of the lamp server, that refers to something in the DMZ range? I mean within BrazilFW? I don't think this will solve my problem, but it may be quicker than modifying files.
ss3vegeta
 

Re: Set Static IP on Ubuntu LAMP?

Mensagempor bobbb » Qua Abr 08, 2009 2:51 pm

I've tried posting on an Ubuntu help forum and I've been told it's an issue with my firewall/router.
Typical reply. Pass the buck. If it is the router then why does the Windows one work? Let me look at this more deeply and see.

Show me the output of ipconfig /all from the Windows AMP and ifconfig from BrazilFW

all of these work perfectly if I use an IP address that isn't in my dmz
This graps my attention. Is the DMZ on a separate NIC?

need to do in Coyote to make this work
Coyote or BrazilFW? Which version?
bobbb
 

Re: Set Static IP on Ubuntu LAMP?

Mensagempor ss3vegeta » Qua Abr 08, 2009 4:05 pm

bobbb escreveu:Typical reply. Pass the buck. If it is the router then why does the Windows one work? Let me look at this more deeply and see.

Tell me about it, I didn't think it made much sense either.

bobbb escreveu:Show me the output of ipconfig /all from the Windows AMP and ifconfig from BrazilFW

If the below doesn't solve the problem, I will most certainly post the outputs.

bobbb escreveu:This graps my attention. Is the DMZ on a separate NIC?

Yes it is on a separate NIC. The WAMP had a crossover cable connected directly to the BrazilFW box. I switched out the crossover for a old 5 port switch, which I'm starting to think may be the issue as the WAMP is now down as well. When I get home I'm going to try a different switch and make sure the WAMP is up and working then try setting the static IP on the LAMP. To clarify, when it is on the NIC that feeds the 192.168.0.1 network with DHCP it works perfectly.

bobbb escreveu:Coyote or BrazilFW?

It's the latest 2.x of BrazilFW. I slip up some times and call it Coyote, I used it longer as Coyote than I have as BrazilFW... My old brain just wants to be nostalgic.
ss3vegeta
 

Re: Set Static IP on Ubuntu LAMP?

Mensagempor bobbb » Qua Abr 08, 2009 4:19 pm

OK.

And I guess the ifconfig from the Ubuntu machine too. Oh and that reminds me that I must build one too.
bobbb
 

Re: Set Static IP on Ubuntu LAMP?

Mensagempor ss3vegeta » Sáb Abr 11, 2009 1:46 pm

I changed out the switch today, and I now have no issues with connectivity. Thanks for all the help.
ss3vegeta
 

Re: Set Static IP on Ubuntu LAMP?

Mensagempor bobbb » Dom Abr 12, 2009 3:28 am

That's good but the Ubuntu forum guy said it was the firewall. :)
bobbb
 


Voltar para BrazilFW 2.x - English Forum

Quem está online

Usuários navegando neste fórum: Nenhum usuário registrado e 3 visitantes