Results 1 to 3 of 3

Thread: NAT- masquerade scenario problem

  1. #1
    Join Date
    Jun 2012

    NAT- masquerade scenario problem

    Hi to all...I have asked all my friends but no one didn't know to help me i was surfing a bit and found out this forum ...i have seen that many problems were solved here, so i hope that my problem will be one of them ...

    So, anyway let me tell my problem (immediately in my first post hahaha)...
    well, i have problem with one simple MASQERADING scenario...really need to help...
    On one computer pc1 (let's call it router) i need to open a new subinterfaces (exp. eth0:1) where is possible to communicate with rest of the my LOCAL AREA NETWORK...I need to set up the NAT on my pc1 (router) and enable another computer PC2 (let's call it user) to communicate with rest of Local Network... Also is necessary to configure the PC2 (user) to use PC1 (router) as gateway (hint: default gateway). And after all that when i check the communicate between PC2 (user) with rest of LAN (with ping) i need to get source address of PC2 (router) in ICMP packets on destination PC.

    And all computers in my Network are have install only one network Interface...
    Well i also post pic here how i see the problem (maybe i didn't drew the best but i think that is clearly what i want to say haha) i hope that will help to you...

    and I also type this commands

    route add default gateway eth0

    Ifconfig eth0:1 netmask up
    Ifconfig eth0:1 netmask up
    iptables -t nat -A POSTROUTING -d -j MASQUERADE
    iptables -A FORWARD -s -d -m state --state RELATED,ESTABLISHED -j ACCEPT
    iptables -A FORWARD - s -d -j ACCEPT
    iptables -t nat -A POSTROUTING -s - j SNAT - - to-source

    and after all that didn't work... i’m so lost...

    don’t know what to do anymore...

    Thanks for any help what i get...
    Attached Images Attached Images
    Last edited by CheerfulSonya; June 1st, 2012 at 10:05 PM.

  2. #2
    Join Date
    Oct 2005
    Al Ain

    Re: NAT- masquerade scenario problem

  3. #3
    Join Date
    Jun 2012

    Re: NAT- masquerade scenario problem

    Many thanks for your help...Much appreciated that...
    the problem was been that i forgot to enable the ip forwarding with command

    1 > /proc/sys/net/ipv4/ip_forward

    thanks again...

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts