NAT with binding alias IPs to a single NIC.

NAT with binding alias IPs to a single NIC.

Post by sammysamm » Mon, 30 Jun 2003 14:52:17


the following nat may be have failed in OpenBSD 3.3:

nat on fxp0 inet from to any -> (fxp0)
nat on rl0 inet from to any -> (rl0)
rdr on fxp0 inet proto tcp from any to a.b.c.d port = 2222 -> port 22
rdr on rl0 inet proto tcp from any to a.b.c.e port = 2222 -> port 22

Public addresses a.b.c.d and a.b.c.e are assigned to fxp0 and rl0

I have and assigned to fxp1, in which is an alias address.

all internal machines in subnet can reach internet
without problem, only machines in subnet failed to reach
the internet.
And the following ping result can reach an internet address, but failed
to get reply traffic:

PING ( 56(84) bytes of data.

Is there is any problem using NAT with alias IP in OpenBSD?
if so, I can solve it by using a seperated NIC for each IP.


Posted via


1. 4.2 nic aliasing, multiple IPs, one nic does not work???

I just upgraded to FreeBSD 4.2 from 4.1.  I had 5 IPs assigned to one
nic on 4.1, one main, 4 alias.  Now on 4.2, it will not accept aliases
to the nic.  When I boot with the config in override /etc/rc.conf, it
assigns the main IP and the first alias, but not the other three.  If
I try to manually configure from the IPs to the nic, it comes back

ifconfig: inet: bad value

I have looked every where I can think of for help, both on and off
line and tried every combination I can think of, but nothing works.
It all worked fine under 4.1.  Did something get changed in 4.2 to
effect how you assign aliases to one nic????

I have asked all I know who work with FreeBSD and they are as baffled
as I am.  Any help or suggestions even if I have already tried them
will be appreciated.  I keep thinking I have made some type of
configuration error or something simple that I am missing, but, search
as I might for a problem, I come up empty handed.

4.2 did not come up with a different way to alias a nic, did it???

Thanks in advance,


2. Samba + Password protected services

3. NAT and aliased ips for internet web servers on 'internal' network

4. SNMPD for redhat

5. Multiple IPs to a single NIC ?????

6. lp* port setup: strange Kernel messages

7. Multiple IPs on Single NIC using IFCONFIG

8. Connected, but very very slow??

9. ipconfig - multiple IPs - swapping IP effect on alias IPs?

10. Apache VirtualHost on Solaris with multiple ips bound to one nic

11. Bind Multiple IPs to One NIC?

12. How do I bind multiple IPs per NIC?

13. 4.2 multiple IPs, one nic(aliasing), does not work??