Algemon
01-17-2001, 08:04 AM
Here is the problem:
I use several different ISPs which thus have different nameserver addresses. I use a standard dialup modem via serial port 56.6 K.
My firewall rules (ipchains since I have't plucked up the courage to compile a 2.4 Kernel yet) are as follows for allowing DNS client modes:
ipchains -A output -i $EXTERNAL_INTERFACE -p udp -s $IPADDR $UNPRIVPORTS -d $NAMESERVER_1 53 -j ACCEPT
ipchains -A input -i $EXTERANL_INTERFACE -p udp -s $NAMESERVER_1 53 -d $IPADDR $UNPRIVPORTS -j ACCEPT
Because each ISP has 2 nameservers and I use 2 ISPs then there are another 3 pairs of rules like these above for $NAMESERVER_2 to $NAMESERVER_4.
Now I wish to sign up to another ISP but it dynamically assigns the nameserver addresses. How do I find out what the nameserver address is for the firewall 'cause I don't just want to accept udp packets from anywhere?
Also there must be an easier way than having to specify each nameserver address in the firewall for each of the ISPs. I know the computer knows the nameserver addresses 'cause the names I type in resolve correctly. So there must be some way to automatically set the values of the variables $NAMESERVER_1 and $NAMESERVER_2 after the connection is established and when the firewall script is run in the /etc/ppp/ip-up file.
How do you do this?
I use several different ISPs which thus have different nameserver addresses. I use a standard dialup modem via serial port 56.6 K.
My firewall rules (ipchains since I have't plucked up the courage to compile a 2.4 Kernel yet) are as follows for allowing DNS client modes:
ipchains -A output -i $EXTERNAL_INTERFACE -p udp -s $IPADDR $UNPRIVPORTS -d $NAMESERVER_1 53 -j ACCEPT
ipchains -A input -i $EXTERANL_INTERFACE -p udp -s $NAMESERVER_1 53 -d $IPADDR $UNPRIVPORTS -j ACCEPT
Because each ISP has 2 nameservers and I use 2 ISPs then there are another 3 pairs of rules like these above for $NAMESERVER_2 to $NAMESERVER_4.
Now I wish to sign up to another ISP but it dynamically assigns the nameserver addresses. How do I find out what the nameserver address is for the firewall 'cause I don't just want to accept udp packets from anywhere?
Also there must be an easier way than having to specify each nameserver address in the firewall for each of the ISPs. I know the computer knows the nameserver addresses 'cause the names I type in resolve correctly. So there must be some way to automatically set the values of the variables $NAMESERVER_1 and $NAMESERVER_2 after the connection is established and when the firewall script is run in the /etc/ppp/ip-up file.
How do you do this?