Click to See Complete Forum and Search --> : ip problems
brendan911
07-28-2002, 02:14 PM
hey,
my linux box is behind a router, it's the dmz. however, it sometimes believes that its ip address is the 192.168.etc one given to it by the router, which causes problems with ftp. how can i tell it what ip adress it should be using? something in /etc/hosts maybe?
thanks,
brendan911
i_like_peanut_butter
07-28-2002, 02:17 PM
Run 'netconfig' as root and assign it the proper IP. Also make sure dhcp services aren't running. If you give it a static IP it shouldn't use dhcp to pick up a new IP. Interesting situation.
brendan911
07-28-2002, 02:50 PM
i don't know how it would work on my network if it werent using dhcp, could i assign it both its local and external ip adresses with just the one nic card?
-brendan911
cowanrl
07-28-2002, 02:56 PM
Originally posted by brendan911
i don't know how it would work on my network if it werent using dhcp, could i assign it both its local and external ip adresses with just the one nic card?
-brendan911
A NIC is only going to have 1 IP address. It can either be assigned statically or via DHCP. I'm not sure what you mean when you say "could I assign both its local and external IP addresses". Could you clarify what IP addresses you are referring to there.
brendan911
07-28-2002, 03:23 PM
sorry, what i meant was:
my linux box is sitting behind a router, the router uses dhcp to assign the linux box a 192.168 (unroutable) ip address. however, the linux box is set on the router to be the DMZ. this causes problems with some daemons (proftpd, for example) because they think they should be running on a 192.168 ip, even when you connect to them from a computer outside the router.
thanks,
brendan911
cowanrl
07-28-2002, 03:46 PM
I believe I see what your problem is now. If your Linux box has a 192.168.x.x address, no one from outside your network will be able to access your proftp server because the 192.168.x.x address can't be routed.
I don't have an always on Internet connection, but I think what you would need to do is configure your router so that all incoming traffic from the Internet that is not in response to traffic from within your network is sent to your Linux box. The router should also take care of translating the IP address of any outgoing traffic from your Linux box to its own IP address. I'm not sure how you would do that on your router.
A problem I can see is using DHCP to assign the IP address on the Linux box. You could get everything all set up and working fine. But then if your Linux box gets assigned a different IP address, nothing would work. Can you statically assign the IP address on your Linux box instead of using DHCP? I think that would be the better way to go.
brendan911
07-28-2002, 07:48 PM
yeah, when a computer is the dmz host, all incoming traffic goes to that computer. that's what the linux box is.
so how would i manually set what the linux box's ip address is? i think that may fix it... dont know though.
brendan911
cowanrl
07-28-2002, 09:12 PM
On most machines, you need to edit the file:
/etc/sysconfig/network-scripts/ifcfg-eth0
If you have more than one NIC, the second NIC would be ifcfg-eth1 and so on.
For a static address, the file should look something like this:
DEVICE='eth0'
BOOTPROTO='none'
IPADDR='192.168.1.40'
NETMASK='255.255.255.0'
ONBOOT='yes'
GATEWAY='192.168.1.39'
TYPE='Ethernet'
USERCTL='no'
You need to supply your own IP address, netmask and default gateway.
Reboot to make the changes take affect.
See if that works.
[[becca]]
05-15-2007, 02:16 PM
help im trying to download msn and its saying theres a prblm with ips wot does this mean?