Guest User!

You are not Sophos Staff.

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

Masquerading Help - I think i'm missing the plot :)

Hi Guys,

I've just got astaro up and running.  [:)] 

Now i've managed to get the http proxy running, so i'm getting web stuff through, i'm just having trouble with masq stuff.

Here is my configuration

Internal Interface 192.168.0.100
Internal Machines - 192.168.0.2
                  - 192.168.0.3
External Interface - 212.xxx.xxx.xxx

Now the two interfaces are setup in interfaces and in def->networks i have the internal and external nets setup (i think) as  192.168.0.100/255.255.255.255 and 212.xxx.xxx.xxx/255.255.255.255 (why is is x.x.x.255?)

In masq i have the Internal Network -> Extermal Card... But it's not working. 

Can anyone help, cheers.  [;)]

Basskiwi.


This thread was automatically locked due to age.
  • Hi there,

    what do you mean "getting web stuff through", while having trouble with masq stuff?

    Can you surf the net without using the http proxy?

    I am not certain if it's necessary, but I added a rule in the packet filter allowing the internal network to use any service to any host..

    I think everything is denied by default, and that you have to open up for the traffic you want.

    Please anyone, shout if I've got it all wrong here :-))

    Ørjan
  • Hello,
    Orjan is right, masquerading is activated independent from the filter rules. So for every service you want to use, you have to define a rule, since by default all are denied. But just allowing all internal hosts to use all ports to the outside I just cannot recommend - kinda defeats the purpose of a firewall... ;-)
    Bye
    Haendchen
  • Ok, first things first.... :-)

    ::Haendchen
    But just allowing all internal hosts to use all ports to the outside I just cannot recommend - kinda defeats the purpose of a firewall... ;-)::

    Ummm... I'm not sure what you are referring to here.... why would you not allow your inside clients to use all services on the internet? Surely, I can imagine many paranoide organizations that will restrict their users.... but for the average joe, I'd say that every service should be accessible to "joe" and his users.


    Now, basskiwi - I noticed something new in your posting, but first:

    **I'm not wanting traffic from the outside world to get through unless it's originated from inside. This is what masq does, isn't it? **

    This is what stateful inspection is about. 
    MASQing, is the technique of having many computers on the inside appear as one to the outside world. Translation from one to many (return traffic) is done by the MASQ in the firewall.

    Now to what may be the real problem here...you may have some wrong network definitions.
    You say you have 255.255.255.255 as network mask for both internal and external interface - and this must be wrong!
    You are actually saying that the external network is only one host, the firewall outside nic!

    My network definitions are like this:
    Outside - 217.xx.xx.0/255.255.255.0
    Inside - 192.168.111.0/255.255.255.0

    THIS is the definition of a network. Anything with a 255.255.255.255 netmask, is considered source routing - to one single host.

    Also, don't forget the sequence on how to set up things in ASL:

    1. Define the network(s) you are going to be dealing with. In addition to the default ones, that means internal and external.

    2. Set up a packet filter that allows what you want to do. The default is deny everything - so if you only define the networks, you'll still have no traffic over the firewall.

    The reason why the http proxy works with your config, is something I can't figure out.

    First, unless there is a really good reason for using a 255.255.255.255 mask in your network definitions - fix these.
    Then create a packet filter allowing you to do *something* (preferrably everything) from the inside to the world.

    I hope this is readable.. and where are all the exxperts?!?!   [:)]

    Ørjan
  • Yeah i thought that was a bit weird, but the system wouldn't allow me to setup the hosts as anything else but netmask 255.255.255.255 :/ It says this in the instruction manual but i would have thought it should have been 192.168.0.1/255.255.255.0, however whenever i try this it gives me an error saying netmask 255.255.255.0 doesn't make sense with host route!
  • I did the same thing when setting up my first ASL too, and I should have known better ;-))

    Remember, that in network definitions, we are dealing primarily with NETWORKS...
    192.168.0.1 is not a network address, it's an IP-address in a network.
    192.168.0.0 on the other hand, is a valid network address, as long as it's used with a standard class C netmask (255.255.255.0). Follow me?

    When that is said, please not that the network doesn't always have to end in .0 - but then we are talking about subnetting - a whole different ballgame.

    Also, if you want to put restrictions on HOSTS instead of a whole NETWORK, you CAN use 255.255.255.255 in combination with a specific IP. This is defined in Definitions-Networks (even if it's not a network), then you apply a rule to it in the Packet Filter menu.

    I hope the last two paragraphs didn't confuse you... the important thing was in the second paragraph   [:)]

    I think my laptop is running out of power, so it's nighty-nighty soon.

    Good luck!

    Ørjan Sandland

    [ 28 August 2001: Message edited by: Ørjan Sandland ]
  • No, I used to have masq setup on my linux box before asl. What would happen is that the internal box would make the request - the firewall would rewrite the request and then relay the stuff back to internal. 

    I'm not wanting traffic from the outside world to get through unless it's originated from inside. This is what masq does, isn't it?  

    When i have the proxy switched off i can't get any traffic through. I run games and stuff which do not have support for socks and use non standard ports. Masq used to work fine for this purpose.

    Thanks.

    Nick.
  • Ok then with that in mind, what should i setup my external network as?  I have now 192.168.0.0 - 255.255.255.0 as my internal network.  

    I then assume that once the external network is configured, in masq, i should set it just to internal-net -> external-net?

    Thanks for all your help,

    Nick
  • Still can't get this silly thing working :/ Hmm maybe time to consider moving back to what i know.
  • I'd like to try being helpful in this thread.

    I was able to make ASL work as I expected in little time, and for sure I'm not what you should call a "guru" so, let's try to explain what I have done here.

    I have about 10 machines here (linux, IRIX, and windows). the internal net is in the 192.168.9.xxx range.

    here my definitions to enable the MASQed network to use the whole internet:

    Definitions -> Networks:
    internal_net   192.168.9.0 255.255.255.0

    Network -> Masquerading
    internal_net --> extern
    please note that "extern" is the external interface eth1, NOT AN EXTERNAL NET

    Packet Filter -> Rules
    internal_net   Any   Any   Allow

    Proxies are all DISABLED (since HTTP proxy is not required, I don't use it to save disk sapce on the server)

    That's all, and as you can see I'm allowing all machines to use every service they want, but they're still protected since the connection is initiated internally (i.e. no one on the outside can ftp, telnet, ssh or whatever to the inside.)

    with this (simple) setup my machines can browse web, ftp, telnet, gnapster etc without problems.

    I advice you first try to reproduce a situation like this, then activate other services (proxies, dnat or whatever) as you need them.

    good luck

    [ 30 August 2001: Message edited by: giallu ]
  • ::basskiwi

    I think that your problem is in the rules that you have set up.  If you have no rules then the packet will never be masq'ed.  The FW will deny all traffic that is trying to pass through the rules base.  
    With that said, you may ask "How an I able to browse the Internet?"  The answer is the HTTP Proxy.  When you use the proxy your packet doesn't pass through the FW.  The computer on the private side makes a connection with the FW and the FW makes a connection with the host on the Internet.  By doing this, you by-pass the rules base.

    Let me know if this helps....
    STICF