Is it possible to bind named to a specific interface?

Justin Piszcz war at starband.net
Sat Mar 30 17:34:46 UTC 2002


Is it possible to bind named to a specific interface for outgoing
requests?

Here's my problem:
I have two interfaces:

eth1==DSL
eth2==SATELLITE

Default route is set to SATELLITE.

I need to bind (like ssh -b) for instance the named daemon to the eth1
interface.
For those of you who are going to say try iptables/iproute2, I have done
this, and DNS fails to work.
Here are the commands:

iptables -A OUTPUT -t mangle -p tcp --dport 53 -j MARK --set-mark 1
iptables -A OUTPUT -t mangle -p udp --dport 53 -j MARK --set-mark 2
ip rule add fwmark 1 table 200
ip rule add fwmark 2 table 200
ip route flush cache

Where table 200 = my DSL table.

What are my options if i would like outbound query's to go out eth1
instead of eth2 [properly] [mangling packets does not solve the
problem]. ?

Please let me know, thanks.



More information about the bind-users mailing list