Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Italiaander <pc-secure@home.nl>
To: Netfilter <netfilter@lists.netfilter.org>
Subject: Re: MASQ problem
Date: Tue, 10 Jun 2003 20:09:49 +0200	[thread overview]
Message-ID: <200306102009.49102.pc-secure@home.nl> (raw)

Op dinsdag 10 juni 2003 06:30, schreef B H R Balaji:
> HI
>
> i have 20 alias interface, iam not able to MASQ using that interface, is
> this iptables supports this option
>
> [root@netxpress root]# iptables -I FORWARD -i eth0:1  -s
> 92.168.100.0/24  -j MASQUERADE
> Warning: wierd character in interface `eth0:1' (No aliases, :, ! or *).
> iptables: Target problem
>
>
> hare

hello

first of all:
Masquerading is done on the POSTROUTING chain.    NOT on the FORWARD chain.

interface_alias in that form is not allowed ,however , you could extract the  
ip_address and use that instead        like;

EXT_IF #external interface
ETH0_1_IP="`/sbin/ifconfig eth0:1 | grep 'inet addr' | awk '{print $2}' | sed 
-e 's/.*://'`"  

 iptables -I POSTROUTING -i eth0:1  -s  92.168.100.0/24  -o $ETH0_1_IP -j 
MASQUERADE

Watch the syntax 
I have used " -o OUT ETH0_1_IP " and not  " -i  ETH0_1_IP"  this is relevant.

Pascal


             reply	other threads:[~2003-06-10 18:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-10 18:09 Pascal Italiaander [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-06-10  4:30 MASQ problem B H R Balaji

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200306102009.49102.pc-secure@home.nl \
    --to=pc-secure@home.nl \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox