Hello forum,
/etc/rc.conf
The primary IP ( IP_MAIN) is for accessing the machine which runs a bind9 DNS server listening on the alias IP address (IP_ALIAS).
The machine is shielded by external firewalls:
Thanxs in advance, I hope a have explained my problem well enough
Marc
Info
I've a network interface with two IPs from the same network:/etc/rc.conf
Code:
hostname="dns-test"
#
ifconfig_vtnet0="inet x.y.z.201/24" # SSH access IP_MAIN
ifconfig_vtnet0_alias01="inet x.y.z.4/32" # DNS server IP_ALIAS
#
defaultrouter="x.y.z.254" # Set to default gateway (or NO).
The primary IP ( IP_MAIN) is for accessing the machine which runs a bind9 DNS server listening on the alias IP address (IP_ALIAS).
The machine is shielded by external firewalls:
- On IP_MAIN allow only internal traffic
- On IP_ALIAS allow outgoing traffic to DNS rootservers for DNS resolution
Problem
- When I do a DNS query for a public domain, the query fails with a timeout as the outgoing connections are blocked
- That means it uses the primary IP as source
Solution found
When I switch the ips, so I make IP_ALIAS the primary IP and IP_MAIN to the alias IP, resolution works fine without a problem.Questions
- Is there a option to tell the system which IP to use for outbound traffic apart from setting the IP as primary?
- Can I even be more specific and tell the system which IP to use for DNS traffic?
Thanxs in advance, I hope a have explained my problem well enough
Marc