Results 1 to 3 of 3
Hi, I have yet another networking question: 1) I have configured a webserver behind a router. 2) The router is forwarding port 80 to the webserver's LAN IP address (192.168.5.50). ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 02-05-2007 #1
Updating a webserver. Ports to use?
I have yet another networking question:
1) I have configured a webserver behind a router.
2) The router is forwarding port 80 to the webserver's LAN IP address (192.168.5.50).
3) Right now if I want to update the webserver, I am doing an ifdown... followed by an ifup... so my webserver can acquire another address from the router (for example 192.168.5.103). After I am done I am doing a ifconfig eth0 192.168.5.50 to go back to step 2), that is, so port 80 is properly forwarded.
Question: is there a way to avoid doing the ifdown... ifup.... as described above in order to run updates on the webserver?
- 02-05-2007 #2
- Join Date
- Mar 2005
in your router's configuration (DHCP) there should be a spot to add the mac address of the NIC that is in the webserver to get the same IP every time
4a:2b:3c:5f:03:9c -> 192.168.5.50
this way you won't have to tell the router which ip to forward your port to every time... dunno why you're using ifup/down though... just shut apache down... do your updates... and start it back up... you don't need to bring your nic down & up
- 02-05-2007 #3
Thanks for the reply. I have a Linksys Wireless-G router so all I can do (I think) is forward port 80 to 192.168.5.50. I couldn't find a way to specify the MAC address of the NIC to this IP.
Also, I just tried shutting apache down (apache2 -k stop) and then I ran an apt-get update, but I found that (as before) I have no means of communication with the internet unless I use a different LAN IP.
I'm sure I'm doing something dumb, so any advise is more than welcome.