Networking Forums

Networking Forums > Computer Networking > Linux Networking > Can I run a Web server behind a NAT router?

Reply
Thread Tools Display Modes

Can I run a Web server behind a NAT router?

 
 
phillipedison1891@yahoo.com
Guest
Posts: n/a

 
      05-07-2005, 11:29 PM
If I have a LAN connected to the Internet via a NAT router and a cable
modem, could I run a computer (running Linux, of course) on the LAN as
a server? If so, how? These routers are supposed to have fancy
firewalls built in to them

_PA

 
Reply With Quote
 
 
 
 
bram4
Guest
Posts: n/a

 
      05-07-2005, 11:45 PM
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

(E-Mail Removed) wrote:
> If I have a LAN connected to the Internet via a NAT router and a cable
> modem, could I run a computer (running Linux, of course) on the LAN as
> a server? If so, how? These routers are supposed to have fancy
> firewalls built in to them
>
> _PA
>


Hi

You have to setup IP-passthrough. Usually it's somewhere in the
webconfig of your router. Your have to tell it that you want incoming
requests to port 80 redirected to the local ip of your server.

The fancy firewall is principally a NAT box. It masquerades the local
IP's behind your public one. It might have an additional firewall, which
you would have to configure too. But I can't tell... Mine is a Netopia
ADSL router.

Regards
Bram4

- --


BIG BROTHER IS WATCHING YOU
www.anti-dmca.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFCfVMBsv7ahDE9W98RAss1AJ9ImsCstOR3nM98lcd+cb bFpz9ViQCgrNH/
wqHuIs4NZHcyDiEtyx3WnRg=
=F4XJ
-----END PGP SIGNATURE-----
 
Reply With Quote
 
Ken
Guest
Posts: n/a

 
      05-07-2005, 11:59 PM
Hi -

On 7 May 2005 16:29:41 -0700, (E-Mail Removed) wrote:

>If I have a LAN connected to the Internet via a NAT router and a cable
>modem, could I run a computer (running Linux, of course) on the LAN as
>a server? If so, how? These routers are supposed to have fancy
>firewalls built in to them


You need to be able to configure the router to forward incoming
connections to port 80 (or whatever port you are going to use) to the
server.

Personally I use a Linux-based system for my router/firewall as well
as my server. A few iptables rules and port 25 (SMTP) and 80 (HTTP)
go to my server. Anything else that is not part of an connection
initiated from the inside gets rejected.

For additional security, the server is in a DMZ, not in the LAN, and
is not permitted to initiate connections to the LAN.

--
Ken
http://www.ke9nr.net/
 
Reply With Quote
 
Kunael
Guest
Posts: n/a

 
      05-08-2005, 10:00 AM
>>If I have a LAN connected to the Internet via a NAT router and a cable
>>modem, could I run a computer (running Linux, of course) on the LAN as
>>a server? If so, how? These routers are supposed to have fancy
>>firewalls built in to them

>
> You need to be able to configure the router to forward incoming
> connections to port 80 (or whatever port you are going to use) to the
> server.


* One clue: DNAT. Man iptables, of course.

> For additional security, the server is in a DMZ, not in the LAN, and
> is not permitted to initiate connections to the LAN.


* Exactly. If the web-server is in DMZ segment and this is hacked in future
you LAN remains safe.

--
¡Share your knowledge!

Linux user id 332494 # http://counter.li.org/
PGP id 0xC5ABA76A # http://pgp.mit.edu/
 
Reply With Quote
 
soulimane.mammar@gmail.com
Guest
Posts: n/a

 
      05-08-2005, 11:13 AM
Hi ,
This is quite simple
First your ISP must fix you a public adress say "pubaddr1"
then issue this command :
iptables -t nat -A PREROUTING -p tcp -d "pubaddr1" --dport 80 -j DNAT
--to <your server local ip>
Good Luck
S. MAMMAR

 
Reply With Quote
 
James Knott
Guest
Posts: n/a

 
      05-08-2005, 11:46 AM
(E-Mail Removed) wrote:

> If I have a LAN connected to the Internet via a NAT router and a cable
> modem, could I run a computer (running Linux, of course) on the LAN as
> a server?**If*so,**how?**These*routers*are*supposed*to*have*fancy
> firewalls built in to them
>


You can, if your router supports port forwarding to a specific computer.

 
Reply With Quote
 
 
 
Reply

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a router/print server to my ADSL-modem/router Edmund Network Routers 2 07-29-2007 12:13 PM
Can a router w/ print server work as a plain print server? john Wireless Internet 1 11-03-2004 02:31 AM
Using Router Print Server behind another router? CJM Network Routers 0 08-10-2004 12:21 AM
Windows Server vs router as DHCP server Gerald Roston Windows Networking 4 03-05-2004 05:29 PM
Combining wired router with print server with wireless router fromdifferent company Tim Wireless Internet 2 09-12-2003 02:13 AM



1 2 3 4 5 6 7 8 9 10 11