Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wireless configuration question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1633

PostPosted: Wed Jan 19, 2011 10:28 am    Post subject: Wireless configuration question Reply with quote

I am trying to (without success obviously) trying to configure /etc/conf.d/net so that when I connect to "myssid" that dhcp gets the nodns option, but when I connect to "otherssid1" or "otherssid2" it doesn't (I know I can just leave those out, since dns is the default). I have looked through net.example and wireless.example, but still don't have it right. Can someone enlighten me?
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1633

PostPosted: Sat Jan 22, 2011 8:27 pm    Post subject: Reply with quote

Come on. Somebody has to know how to do this.

I have a related question I will add here.

How do I configure wireless so that iptables is started for some ssids,but not for others?
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Mon Jan 24, 2011 1:20 am    Post subject: Reply with quote

Q1:

I do this for all ssids:
dhcp_wlan0="release nontp nonis nodns"

and then set dns etc per ssid:

routes_ssid="default via x.x.x.x"
dns_servers_ssid="y.y.y.y"
dns_search_ssid="example.co.uk"

Q2:
Add something like this to /etc/conf.d/net for the iptables thing. For completeness you might want to clear them all out in a postdown{} script and perhaps a default lock down at bootup by setting some basic rules when net.lo starts up:

postup() {

if [ "${IFACE}" = "wlan0" ]
then
einfo "Global iptables"
# global iptables here

einfo "iptables depending on location (${SSID})"
logger -t "postup" "wlan0 - SSID = ${SSID}"
case "${SSID}" in
ssid1)
# iptables here for ssid1
;;
ssid2)
# iptables here for ssid2
;;
esac
logger -t "postup" "wlan0 - finished per SSID processing"
fi

return 0
}


Cheers
Jon
Back to top
View user's profile Send private message
curmudgeon
Veteran
Veteran


Joined: 08 Aug 2003
Posts: 1633

PostPosted: Tue Jan 25, 2011 12:15 pm    Post subject: Reply with quote

That gives me some ideas for question two (thanks), but the way you handled question one is not really what I need. I want to automatically get dns servers when I don't know them, and not touch anything when I do know them.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum