This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Config for a web server

Finally I have got around to putting a web server in my network. Now I need to connect it to the world.
I have read the Web Server/DNAT doco but it talks about using the IP assigned by the ISP as the additional address on the ethernet interface. Bit of a problem there, I have a dynamic IP that I control through a CustomDNS at dyndns.org.
In front of my ASL box is a NAT router that does the PPPoE stuff, no filtering, just NAT. Naturally, the IP to my domain is at the front of this NAT router.
What I would like to know is how to configure the ASL box so I can run my web server in a DMZ (eth2) behind the NAT router.
I thought I'd ask here as I am sure there is more than just me connecting this way.
Any help here will be appreciated.  [:)]

BTW: ASL 4.021


This thread was automatically locked due to age.
Parents
  • why not have asl do the natting for you instead of a router?  then you can use the proper rules in asl and it will work fine. Going through a double nat is a PITA and not really needed(unless you have no control overthe wire).
  • For some other testing reasons I connect directly to the router, so I do not want to get rid of it.
    That asside, even if I did get rid of the router, I would still have a dynamic IP address at the front of my network.
    All the instructions I have seen about setting up a web server in the DMZ mention using a fixed IP. Don't have that.  [:(]

    I just want to know if I can set up my web server in an ASL DMZ behind a NetGear DSL router/switch with a dynamic IP assigned by the ISP.
    As I said in my first post, surely others do this. I'd just like to know how.
  • A simple NAT rule like the one below, will make a web server on one of your internal networks (mine is on my DMZ network) visible on the external interface on your ASL v4 box:

    Webserver  Any -> External_Interface__ / HTTP None  myweb.mynet.local

    If you have a router frontending your ASL box, you will have to configure port forwarding on the router for port 80. You forward port 80 to the IP address of the external interface of the ASL box.
  • Yeah!  -  It works . . .

    Looking back, all that was necessary was to NOT create the "additional address on external interface". Everthing else, including the "port forward" from the router already existed in my config.
    I will say however that ASL did not deal well with all of the config changes I was making. I did an external scan of my ports from GRC.com and it showed FTP ports as open and SMTP as closed. Had me weirded out for a bit.   [:S]

    A reboot of the ASL box saw it all come good again however.

    Thanks for the inputs to my post, they are always appreciated and why I keep using ASL as my firewall.
    No product can survive well without support, not a problem here.  
  • Hi VelvetFog ,

    Could you explain more clear on the setting, I am new, but
    i have lost here.

    I have a webserver behind ASL 5.001, I do not know how
    to publish. I am using ADSL with dynamic ip and dyndns

    Internet-->(DHCP by isp )ASL5.001(internal ip 192.168.22.1)webserver (192.168.22.9 )


    Please thank.

    Tks/raid
  • The simple NAT rule to make a web server on one of your internal networks (Internal or DMZ) visible on the External interface, which has a real IP address, looks like this:

    Webserver Any -> External_Interface__ / HTTP None mywebserver.whatever.local

    You first have to create a network definition for your server (I used mywebserver.whatever.local in this example). The network definition must have the IP address used for the server (the private address it is actually using), with a mask of 255.255.255.255

    Then you create the NAT rule like this:

    Name Webserver
    Rule type: DNAT/SNAT
    Packets to match:
    Source address:  Any
    Destination Address: External_Interface
    Service: HTTP
    Change source to: No change
    Change destination to: mywebserver.whatever.local
    Service destination: No change

    That is all there is to it. I have two web servers (one uses port 88) and a FTP server mapped out onto my public IP address this way. They all work fine.
  • Hi VelvetFog ,

    Sorry VelvetFog, what mean mywebserver.whatever.local?
    Could pls explain to me.

    Tks/raid
  • mywebserver.whatever.local is the name you give your network definition for the local ip address of your server...ie. in Definitions --> Networks:

    Name: mywebserver.whatever.local (this name is an example; enter any name you want to give your server)

    IP Address:  xxx.xxx.xxx.xxx (local address of server)

    Mask: 255.255.255.255 or 32
  • [ QUOTE ]
    Hi VelvetFog ,

    Sorry VelvetFog, what mean mywebserver.whatever.local?
    Could pls explain to me.

    [/ QUOTE ]It is a example name for a web server, for the purpose of discussion. Another way of saying "INSERT YOUR OWN SERVER NAME HERE".

    When you go into ASL Webadmin --> Definitions --> Networks, you have to call the entries you create something. They have to have a name. Internet naming is commonly done by using the DNS (Domain Naming System) naming convention, which at a minimum provides for a machine name, followed by a second level domain name, followed by a top level domain name, with the three entries being seperated by dots (.). 

    I can obviously not suggest that you call your web server www.microsoft.com, or some other real name that is already in use, so when giving an example, I use a sample name such as  mywebserver.whatever.local. The idea is that in your implementation on your system, you substitute the machine name that is appropriate for you.

    Most people are not confused by this approach.
Reply
  • [ QUOTE ]
    Hi VelvetFog ,

    Sorry VelvetFog, what mean mywebserver.whatever.local?
    Could pls explain to me.

    [/ QUOTE ]It is a example name for a web server, for the purpose of discussion. Another way of saying "INSERT YOUR OWN SERVER NAME HERE".

    When you go into ASL Webadmin --> Definitions --> Networks, you have to call the entries you create something. They have to have a name. Internet naming is commonly done by using the DNS (Domain Naming System) naming convention, which at a minimum provides for a machine name, followed by a second level domain name, followed by a top level domain name, with the three entries being seperated by dots (.). 

    I can obviously not suggest that you call your web server www.microsoft.com, or some other real name that is already in use, so when giving an example, I use a sample name such as  mywebserver.whatever.local. The idea is that in your implementation on your system, you substitute the machine name that is appropriate for you.

    Most people are not confused by this approach.
Children
  • [ QUOTE ]
    Try  this . It helped me. 

    [/ QUOTE ]I take it you meant this as a reply to user "raid", rather than as a message to me.
  • Hi VelvetFog,

    I have error when i try to connect from out site.
    Error as below.

    ERROR
    The requested URL could not be retrieved

    While trying retrieve the URL:http://xxx.xxx.xxx
    The following error was encountered:
    .Connection failed

    The system returned:

    (111) Connection refused

    The remote host or network may be down. Please try the request again.

    Your cache administtator is webmaster.
    ---------------------------------------------------------------------
    Generated Sun, 18 Apr 2004 11:13:25 GMT by xxx.xxx.xx (squid/2.5.STABLE4)

    My Setting with Proxies HTTP and DNS enable.

    Pls help

    Tks/raid
  • [ QUOTE ]
    I have error when i try to connect from out site.

    [/ QUOTE ]Your english is a bit off.
    Are you trying to browse from a machine on the inside to the outside world, or from the outside and in?

    Assuming you are on a machine on the inside LAN, going through the squid proxy to do your browsing, can you open a DOS box and PING the URL that you are trying to reach? Is it just a single site that you are unable to reach, or can't you get out to the Internet at all?

    Basic connectivity debugging for IP connectivity and DNS resolution problems are best done using PING. If you are using ASL v4, make sure that in Webadmin, under Packet Filter --> ICMP, everything on that page is turned on (all green lights), otherwise pinging won't pass through the ASL box.

    You will have to do the nessessary troubleshooting to establish what cathegory your connection problem falls into. It is likely one of these three:

    1. Your router is not connected to the outside world.

    2. You are not resolving DNS names into IP addresses

    3. Your filter rules are wrong, and are blocking communication.


    Let us know what you discover.
  • Hi VelvetFog,

    Sorry for my poor english.
    Actualy i am publish a internal webserver and the error
    is from a client site that are trying to connect from outsite world.

    Below error is from outsite world client browser.

    The requested URL could not be retrieved

    While trying retrieve the URL:http://xxx.xxx.xxx
    The following error was encountered:
    .Connection failed

    The system returned:

    (111) Connection refused

    The remote host or network may be down. Please try the request again.

    Your cache administtator is webmaster.
    ---------------------------------------------------------------------
    Generated Sun, 18 Apr 2004 11:13:25 GMT by xxx.xxx.xx (squid/2.5.STABLE4)


    Hope you know what i mean.

    Tks/koh
  • Have you configured the static NAT rule that's required to present the web server on your external Interface?
    That was discussed in a previous memo.

    Do you have packet filtering configured to allow the traffic from the web server to get out?
    A filter rule such as Any HTTP Any Allow will do it.

    Do you have the default gateway on the web server configured to point to the ASL Ethernet interface on the network that it resides on (Internal or DMZ)?

    What have you configured on your ASL box so far?
  • Hi VelvetFog,

    So far i have done:

    1) Definition -> Network -> create a host 192.168.50.9/32 Name :
    2)  Network -> NAT/Masquerading ->  DNAT/SNAT

    Name Webserver 
    Rule type: DNAT/SNAT 
    Packets to match: 
    Source address: Any 
    Destination Address: External_Interface 
    Service: HTTP 
    Change source to: No change 
    Change destination to: webserver
    Service destination: No change

    3) Packet Filter -> Rules -> Create
    Source: Any Service: HTTP Destination: Any

    This is what i have done upto now. Do i did anyting wrong and i have
    missed ssomething?

    Tks/Raid
  • Your configuration details look OK.

    If the web server is still not accessible from outside, are there any other issues that have not been dealt with?

    The Nat rule you created will get the traffic from the external world in to the web server.
    You also need to get the reply traffic out.

    Does the web server have a default gateway configured that points to the Internal (or DMZ) interface of the ASL box?
    If it does not, none of the web server's reply traffic will leave the local LAN it is on.

    Do you have a standard masquerade rule in place on the ASL box for the network the web server is on, so that the reply traffic gets out?

    As an example, I masquerade both my Internal and DMZ networks behind the External interface like this:

    DMZ_NAT  DMZ_Network__ -> All / All  MASQ__External  None
    INTERNAL_NAT  Internal_Network__ -> All / All MASQ__External  None