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

IP aliases and Masquerading

Hi !

Since v.2.000 IP aliases are oficially supported.

Is it possible to masquerade an "internal" 
IP as an "external" IP alias ?

I could not do it with the web interface.

Is it a limitation of the web interface or
of the Linux kernel ?

And if it is of the web interface,
will editing /etc/wfe/conf/masqdata help ?

Thanks !

Alex.


This thread was automatically locked due to age.
Parents
  • I really did not understand what you're willing to do with your ASL. please show me an example and I'll see if I can help in some way.

    Regards
  • Example:
    eth0 - external public 195.75.34.136
    Aliases:
    eth0:0                 195.75.34.137
    eth0:1                 195.75.34.138

    Internal:
    eth1:           192.168.0.1/24

    I want to masquarade 
    192.168.0.136 as 195.75.34.136 (possible)
    192.168.0.137 as 195.75.34.137 
    192.168.0.138 as 195.75.34.138 

    the last 2 masquarades seem not possible to do with the current web interface.

    Thank you.
  • In the NAT section of the FAQ it is stated that you can map an IP/port to an internal IP/port. 
    Furthermore it is possible to to do NAT of a IP/port range to IP/sam port range hence you should be able to have an alias that works as you like. Anyway I think that for security reasons it is much better to explicity allow connections to internal machines only for the ports you need.

    Hope this answer your question

    regards
  • Thank you for the answer.
    But I think we still have some misunderstanding...

    As far as I understood, you are talking 
    about the NAT and connections from outside to inside, and I my question was about 
    masquarading (the other way - from internal to outside external network)...

    Best Regards, 
    Alex.
Reply
  • Thank you for the answer.
    But I think we still have some misunderstanding...

    As far as I understood, you are talking 
    about the NAT and connections from outside to inside, and I my question was about 
    masquarading (the other way - from internal to outside external network)...

    Best Regards, 
    Alex.
Children
  • hi alexf,

    what you want to do is best achived with proxy ARP, not NAT. That way, you can use the official IPs internally.

    /tom
  • Hi !

    But doing that would mean splitting the network into subnets (because I can not assign the same network to different interfaces), changing IPs of the machines
    behind the firewall and some other work on the running live systems, which is not 

    So I would rather use masquarading for this setup, is it possible ?

    Thank you,

    Best Regards,
    Alex.
  • It's my understanding SNATing an alias is supported (well documented at least) with IPTables/Netfilter - the following snippet is from the NAT-HOWTO from Rusty http://netfilter.filewatcher.org/unreliable-guides/NAT-HOWTO.txt 

    2. If you are doing SNAT onto an unused address on the local LAN (for
         example, you're mapping onto 1.2.3.99, a free IP on your 1.2.3.0/24
         network), your NAT box will need to respond to ARP requests for
         that address as well as its own: the easiest way to do this is
         create an IP alias, eg:


      # ip address add 1.2.3.99 dev eth0