Skip to contentSkip to conversation

Are IP ALIASES supported by iptables?

DISCUSSION HTB 5 participants 6 messages Jul 29, 2003

lore
Share & tools
lore

HTB

author
#0 lore raw

When i want to active nat using iptable on eth0:0 (aliasing) "error appear"

# /sbin/iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o eth0:0
Warning: wierd character in interface `eth0:0' (No aliases, :, ! or *).

Are IP ALIASES supported by iptables?

regards

HTB

#1 lore raw

Hi, it must be Is your Kernel compiled with IP Aliasing? Yes, Iptables support ip aliasing.

--
Thank you,
Louie Miranda ([email protected])

----- Original Message -----
From: HTB
To: [email protected]
Sent: Tuesday, July 29, 2003 1:06 PM
Subject: Are IP ALIASES supported by iptables?

When i want to active nat using iptable on eth0:0 (aliasing) "error appear"

  # /sbin/iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o eth0:0
  Warning: wierd character in interface `eth0:0' (No aliases, :, ! or *).

Are IP ALIASES supported by iptables?

regards

HTB

#2 lore raw

Oh, wait i've read it wrong.. sorry..

--
Thank you,
Louie Miranda ([email protected])

----- Original Message -----
From: Louie Miranda
To: HTB ; [email protected]
Sent: Tuesday, July 29, 2003 1:18 PM
Subject: Re: Are IP ALIASES supported by iptables?

Hi, it must be Is your Kernel compiled with IP Aliasing? Yes, Iptables support ip aliasing.

--
Thank you,
Louie Miranda ([email protected])

----- Original Message -----
From: HTB
To: [email protected]
Sent: Tuesday, July 29, 2003 1:06 PM
Subject: Are IP ALIASES supported by iptables?

When i want to active nat using iptable on eth0:0 (aliasing) "error appear"

# /sbin/iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o
eth0:0
Warning: wierd character in interface `eth0:0' (No aliases, :, ! or *).

Are IP ALIASES supported by iptables?

regards
HTB

#3 lore raw
In reply to HTB

nope. IP Aliases are depreciated, baby!

Quoted 14 lines · HTB

When i want to active nat using iptable on eth0:0 (aliasing) "error appear"

# /sbin/iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 
-o eth0:0
Warning: wierd character in interface `eth0:0' (No aliases, :, ! or *).

Are IP ALIASES supported by iptables?

regards

HTB

#4 lore raw
In reply to HTB
Quoted 3 lines · HTB

When i want to active nat using iptable on eth0:0 (aliasing) "error appear"

# /sbin/iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o eth0:0
Warning: wierd character in interface `eth0:0' (No aliases, :, ! or *).

If eth0:0 has FIX IP address, you should try SNAT:

# iptables -A POSTROUTING -t nat -s 192.168.0.0/24 -j SNAT --to IP_of_eth0:0 

Nandor Szabo

#5 lore raw
In reply to HTB
Quoted 5 lines · HTB

When i want to active nat using iptable on eth0:0 (aliasing) "error appear"

# /sbin/iptables -A POSTROUTING -j MASQUERADE -t nat -s 192.168.0.0/24 -o eth0:0
Warning: wierd character in interface `eth0:0' (No aliases, :, ! or *).

Are IP ALIASES supported by iptables?

Ip Aliases practically don't exist anymore, they are just one other ip address on eth0 marked with a compatibility flag for the old ifconfig. (Use ip/iproute2 and you see what I mean).

So don't use MASQUERADE and eth0:0, but instead use SNAT and the second ip of eth0 (aka the one on your eth0:0)

c'ya
sven

Signature · 2 lines
The Internet treats censorship as a routing problem, and routes around it.
(John Gilmore on http://www.cygnus.com/~gnu/)