Skip to contentSkip to conversation

iptables and device aliases

DISCUSSION Dave Warchol 1 participant 1 message Aug 18, 2004

lore
Share & tools
lore
#0 lore raw

I will still need to define the device alias, correct? Thanks
Dave

Quoted 5 lines
Quoted 2 lines
Quoted 2 lines

"Jason Opperisano" <[email protected]> 08/18/04 09:25AM

Hello:
I am new to the list. I am currently using iptables to
redirect traffic on eth0 for ports 80 and 443, to ports 8080 and

8443,

Quoted 1 line

respectively. I have request to set up another DNS name for this

server

Quoted 1 line

and to redirect entries coming to port 443 for this new DNS name to

port

Quoted 1 line

8444. I think that one way of doing this would be to define a

device

Quoted 1 line

alias, say eth0:1, assign it a new IP address and associate the new

DNS

Quoted 1 line

name with that new IP. I could then use iptables to redirect traffic

on

Quoted 3 lines

eth0:1, port 443 to port 8444. I was just wondering if iptables recognizes/supports device aliases or if there is a better way of accomplishing the same thing.

iptables does not recognise the "eth0:1" syntax. use ip aliases:

ip address add x.x.x.x dev eth0

and then filter on "-i eth0" and ip address "x.x.x.x"

-j