Re: pppoe configuration and dns name resolution
Hi This time I configured as simple as possible with minimal settings, and voila things worked. I successfully connected to internet in both cases - DHCP server disabled in adsl modem, and DHCP server enabled in adsl modem. Thanks all of you guys for helping. :) Here are config files: ## /etc/rc.config hostname=jacks_lappy ifconfig_fxp0=DHCP # The below line is to be used if DHCP server on adsl # modem is disabled. #ifconfig_fxp0=inet 192.168.1.4 netmask 255.255.255.0 # This is assigned to telnet to adsl modem and configure it, # if you don't wanna communicate with modem, remove # this line. It doesn't affect ppp connectivity, in any way - # I tried removing it and got connected successfully. sshd_enable=YES moused_enable=YES powerd_enable=YES # Set dumpdev to AUTO to enable crash dumps, NO to disable dumpdev=AUTO hald_enable=YES dbus_enable=YES --- ## /etc/ppp/ppp.conf: default: set log Phase tun command adsl: set device PPPoE:fxp0 #MRU is optional too, you can remove it # w/o affecting ppp connectivity. set mru 1492 #set mtu 1492 # This was the cause of failure. # See man ppp for more info. # If MTU is set, ppp will not accept MRU values less than MTU. # e.g. MTU = 1492. Now if your ISP has MTU = 1460(my case), then # ppp on your PC, will not connect to ppp server at your ISP side. # So DO NOT set MTU explicitly. set authname myusername set authkey mypassword set dial set login add default HISADDR enable dns # a must, if DHCP server is enabled in adsl modem # and if you don't wanna edit /etc/resolv.conf # each time before connecting tp ISP's ppp server. #Now you don't need to touch /etc/resolv.conf - My /etc/resolv.conf is updated each time I start ppp, so I didn't needed to edit it. I simply started ppp via ppp -ddial adsl I also didn't start ppp at bootup, as it requires that your adsl modem must be powered on before FreeBSD begins booting, which is not the usual case for me. Also, as soon as I started ppp, an ip address is assigned to tun0 interface by ISP, while fxp0 was assigned its ip address via DHCP server enabled in adsl modem, even before I attempted to dial ppp. That is expected. I also tested this configuration with DHCP server disabled in adsl modem and it too worked successfully, except I need to chnage the line fxp0=DHCP to manually assigned ip address one, no other change was needed. The problem might be I was I trying to explcitly set MTU to be 1492, which ppp takes as minimum value - ie no MTU value less than 1492 is agreed upon by user ppp. My ISP's MTU was 1460, and since 1460 1492, so ppp was not agreeing upon MTU value and no connection was made. Thanks again all of you guys for sorting this out. :) Mean while I created a script to start and stop ppp service for a profile. This script is specifically written for csh/tcsh shell - the default one for FreeBSD, so some changes need to be made if it is to be run in other shells. Just go to c shell and type pppdo profilename start | stop where 'profilename' is the desired profilename defined in etc/ppp/ppp.conf, and either you 'start' ppp or 'stop' ppp. Here goes the script: pppdo.sh #!/bin/csh if ( $#argv != 2 ) then echo Usage: $0 ppp_profile start | stop exit endif switch ($2) case start: /usr/sbin/ppp -ddial $1 ; breaksw case stop: killall -INT ppp killall -HUP ppp ; breaksw default: echo $0 : Invalid Cmd ; breaksw endsw - NOTE: before executing this script make sure it is executable If not, type this at shell: chmod +x ./pppdo.sh After executing this script try pinging to a remote site to confirm connectivity, e.g. type this at shell: ping -c5 freebsd.org If you get 0.0% packet loss, then you made it! So, the only files that require modifications are /etc/ppp/ppp.conf and /etc/rc.conf No other file need to be modified to use user ppp, no matter whether DHCP server on your adsl modem is enabled or disabled, it doesn't matter - just use the configuration mention above. Then use the script as: ./pppdo adsl start to start the ppp profile named adsl(tun0 interface is created), and use ./pppdo adsl stop to stop the ppp. This will destroy the tun0 interface too. PS: The user account from which this script is to be run, must be a member of network group too, though network group need not to be the user's login group. This is the requirement of user ppp itself, and not of this script. Regards -- Jack ___
Re: pppoe configuration and dns name resolution
On Sat, 20 Oct 2012 09:42:31 +0530, Jack wrote: Hi again, This time I disabled DHCP on my fxp0 interface and in my adsl modem too. But the problem still exists. This time I tried both approaches: assigned an IP address explicitly to fxp0, and then no explicit assignment to fxp0. That should be the easiest test setting. I still don' get why FreeBSD is having trouble connecting via PPP. Seems to be a specific problem. There is no general problem with PPPoE on FreeBSD. I am trying every combinations that might work, but still no luck. Any help will be appreciated. Try to limit variables as much as possible. Control one thing per time. I'm posting my config files. The statements in comments are those that I already tried enabling them. ## /etc/rc.conf hostname=jacks_lappy #ifconfig_fxp0=DHCP #ifconfig_tun0= ifconfig_fxp0=inet 192.168.1.4 netmask 255.255.255.0 #ifconfig_fxp0= Is this IP inside your network? In my old setting, I had defined the IP for the NIC connected to the modem as 192.168.0.1, but my own network (and therefor also the 2nd NIC in the machine) in 192.168.1.* - I don't know if the first could have been omitted, just doing =up for the NIC connected to the modem. sshd_enable=YES moused_enable=YES powerd_enable=YES # Set dumpdev to AUTO to enable crash dumps, NO to disable dumpdev=AUTO hald_enable=YES dbus_enable=YES No problem here, not related. routerenable=NO This option does not exist. See /etc/defaults/rc.conf for a list of them. I haven't used that option in the working setup. #defaultrouter=192.168.1.1 Correct - I also did not define a default router. ppp_enable=YES ppp_mode=ddial ppp_nat=NO ppp_profile=adsl ppp_adsl_unit=0 I've also not used the last parameter. The tun0 interface would have been generated automatically. Everything implies that the _kernel_ has all the neccessary functionality enabled (tun interface, PPPoE related netgraph modules and NIC support). I tried to specify tun0 interface explicitly, but still no luck. No need to do so. When I start ppp using: service ppp start It shows tun0 is busy. Which is correct. ## etc/resolv.conf #Open DNS nameservers: nameserver 208.67.222.222 nameserver 208.67.220.220 Those are OpenDNS resolvers. I've been using two provided by my ISP, and also ran named myself later on. ## /etc/ppp/ppp.conf default: set log Phase chat lcp ipcp ccp tun command lqm set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 # set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0 nat enable no adsl: set device PPPoE:fxp0 #set device PPPoE:tun0 set mru 1492 set mtu 1492 set ctsrts off set speed sync set dial enable lqr set login set authname myusername set authkey mypassword set timeout 120 set redial 0 0 add default HISADDR #enable dns Why not try a minimal configuration? myispname: set device PPPoE:fxp0 set authname myusername set authkey mypassword set dial set login add default HISADDR That should be everything which is needed. For better diagnostics, add your custom options (like lpr or redial) later on. As I said, all my examples and suggestions are taken from a working example, different OS versions, different physical modems. -- ## output of ifconfig just after boot: fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=2009RXCSUM,VLAN_MTU,WOL_MAGIC ether 00:16:d3:0c:42:22 inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255 inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet autoselect (100baseTX full-duplex) status: active Looks good so far - connected to the modem. tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500 options=8LINKSTATE nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL Opened by PID 1231 Does not look good - no IP assigned. ## output of ifconfig after I started ppp using ## service ppp start The ppp should have been started automatically... fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=2009RXCSUM,VLAN_MTU,WOL_MAGIC ether 00:16:d3:0c:42:22 inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255 inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet autoselect (100baseTX full-duplex) status: active Again, looks correct. tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500 options=8LINKSTATE nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL Opened by PID 1231 And again no IP here.
Re: pppoe configuration and dns name resolution
On Sat, 20 Oct 2012 09:42:31 +0530 Jack wrote: Hi again, This time I disabled DHCP on my fxp0 interface and in my adsl modem too. But the problem still exists. This time I tried both approaches: assigned an IP address explicitly to fxp0, and then no explicit assignment to fxp0. I'd leave fxp0 unset until you've fixed the other problems - it's not necessary for PPP. Modems and routers in PPPoE bridging mode don't normally require any adjustment or other access so there's probably no need to assign address anyway. I still don' get why FreeBSD is having trouble connecting via PPP. The original problem you quoted was with DNS and that's explained by the DHCP on fxp0 overwriting resolv.conf with the router/modem's own non-functional DNS proxy. As regards ppp.conf mine was simply: default: set log Phase tun command adsl: set device PPPoE:vr0 set authname my username set authkey my password add default HISADDR ppp_adsl_unit=0 I tried to specify tun0 interface explicitly, but still no luck. When I start ppp using: service ppp start It shows tun0 is busy. Don't try to specify the tun device number. I've noticed in the past that occasionally tun0 becomes unusable and ppp will switch to tun1. I've seen this happen when I've been restarting ppp a lot. From my understanding it shoud not matter whether fxp0 is assigned the ip address via DHCP server on local lan or via manually - at least this concept works on windows. But in FreeBSD, if I enable dhcp on fxp0, then /etc/resolv.conf is created each time I boot in FreeBSD, so the only nameserver being 192.168.1.1, ie adsl modem ethernet interface. Even if I edit it to include nameservers of my ISP or OpenDNS this file is created each time FreeBSD boots, and these entries are lost, with only entry being 192.168.1.1 There's no good reason to use DHCP in this case, you can simply set a static private IP address (typically a high address in the same /24 as the modem). If you really must use DHCP then it can be reconfigured globally or per interface (type apropos dhclient). I notice that the original resolv.conf you quoted was set by resolvconf. I've never used this so I can't comment on whether it's helping or hindering. I suspect it aimed at laptops switching between different networks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On Thu, 18 Oct 2012 20:03:50 +0100, RW wrote: On Tue, 16 Oct 2012 20:38:47 +0530 Jack wrote: /etc/resolv.conf # Generated by resolvconf nameserver 192.168.1.1 If 192.168.1.1 is the modem, how can it be a proxy nameserver? It doesn't have an internet connection if it's not terminating PPP. You have ifconfig_fxp0=DHCP which means you are picking up DHCP from the modem itself not the other side of the PPP link. In bridging mode you only need to configure the underlying ethernet device if you want to route back-out into the router's LAN (PPPoE and IP can share a lan). You don't necessarily need DHCP with PPPoE because PPP can deliver the IP address, DNS etc by itself. If the ISP requires you to use DHCP you should probably have configured the tun0 interface instead of fxp0. Exactly that's what I did describe in my message: Configuration data is set in ppp.conf, no DHCP involved, and the actual IP will be delivered to the tun0 interface, while fxp0 (in this case) can be used for involving with NAT (if required). Setting the nameserver to an _actual_ nameserver (either running named on the machine, or relying on the ISP's nameservers) is required. This is the easiest approach to dealing with PPPoE modems (if they are used as actual modems without any additional routing, DHCP or other functionality). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
Hi again, This time I disabled DHCP on my fxp0 interface and in my adsl modem too. But the problem still exists. This time I tried both approaches: assigned an IP address explicitly to fxp0, and then no explicit assignment to fxp0. I still don' get why FreeBSD is having trouble connecting via PPP. I am trying every combinations that might work, but still no luck. Any help will be appreciated. I'm posting my config files. The statements in comments are those that I already tried enabling them. ## /etc/rc.conf hostname=jacks_lappy #ifconfig_fxp0=DHCP #ifconfig_tun0= ifconfig_fxp0=inet 192.168.1.4 netmask 255.255.255.0 #ifconfig_fxp0= sshd_enable=YES moused_enable=YES powerd_enable=YES # Set dumpdev to AUTO to enable crash dumps, NO to disable dumpdev=AUTO hald_enable=YES dbus_enable=YES routerenable=NO #defaultrouter=192.168.1.1 ppp_enable=YES ppp_mode=ddial ppp_nat=NO ppp_profile=adsl ppp_adsl_unit=0 I tried to specify tun0 interface explicitly, but still no luck. When I start ppp using: service ppp start It shows tun0 is busy. -- ## etc/resolv.conf #Open DNS nameservers: nameserver 208.67.222.222 nameserver 208.67.220.220 -- ## /etc/ppp/ppp.conf default: set log Phase chat lcp ipcp ccp tun command lqm set ifaddr 10.0.0.1/0 10.0.0.2/0 0.0.0.0 0.0.0.0 # set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 0.0.0.0 nat enable no adsl: set device PPPoE:fxp0 #set device PPPoE:tun0 set mru 1492 set mtu 1492 set ctsrts off set speed sync set dial enable lqr set login set authname myusername set authkey mypassword set timeout 120 set redial 0 0 add default HISADDR #enable dns -- ## output of ifconfig just after boot: fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=2009RXCSUM,VLAN_MTU,WOL_MAGIC ether 00:16:d3:0c:42:22 inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255 inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet autoselect (100baseTX full-duplex) status: active fwe0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500 options=8VLAN_MTU ether 06:e4:0a:1b:50:36 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL ch 1 dma -1 fwip0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500 lladdr 6.e4.a.0.28.1b.50.36.a.2.ff.fe.0.0.0.0 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384 options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9 inet 127.0.0.1 netmask 0xff00 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500 options=8LINKSTATE nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL Opened by PID 1231 -- ## output of ifconfig after I started ppp using ## service ppp start fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=2009RXCSUM,VLAN_MTU,WOL_MAGIC ether 00:16:d3:0c:42:22 inet 192.168.1.4 netmask 0xff00 broadcast 192.168.1.255 inet6 fe80::216:d3ff:fe0c:4222%fxp0 prefixlen 64 scopeid 0x6 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet autoselect (100baseTX full-duplex) status: active fwe0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500 options=8VLAN_MTU ether 06:e4:0a:1b:50:36 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL ch 1 dma -1 fwip0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500 lladdr 6.e4.a.0.28.1b.50.36.a.2.ff.fe.0.0.0.0 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384 options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9 inet 127.0.0.1 netmask 0xff00 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500 options=8LINKSTATE nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL Opened by PID 1231 -- Now it seems to me that there might be some sequence of statements in
Re: pppoe configuration and dns name resolution
On Tue, 16 Oct 2012 20:38:47 +0530 Jack wrote: My network schematic is: PC --- ADSL modem - Internet 192.168.1.2 192.168.1.1 ... /etc/resolv.conf # Generated by resolvconf nameserver 192.168.1.1 If 192.168.1.1 is the modem, how can it be a proxy nameserver? It doesn't have an internet connection if it's not terminating PPP. You have ifconfig_fxp0=DHCP which means you are picking up DHCP from the modem itself not the other side of the PPP link. In bridging mode you only need to configure the underlying ethernet device if you want to route back-out into the router's LAN (PPPoE and IP can share a lan). You don't necessarily need DHCP with PPPoE because PPP can deliver the IP address, DNS etc by itself. If the ISP requires you to use DHCP you should probably have configured the tun0 interface instead of fxp0. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On Tue, Oct 16, 2012 at 9:19 PM, Mark Blackman m...@exonetric.com wrote: On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote: I 'll try mpd5. Thanks. Actually, I was concerned with userland ppp, becoz of the scenarios where we have a FreeBSD machine and the only way to connect to internet is an adsl modem in bridge mode (assuming the mode in modem, can't be changed). In such case the only utilty is ppp, which can be of help. Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe I'm missing your point. - Mark Mark, what I meant is when we have, say a fresh FreeBSD install, then the only service we have at expose is ppp. To be able to use mpd5, or other ports/packages we first need to connect to internet then only we can install/use mpd5. So, by default we are stuck at using ppp builtin with FreeBSD. And yes by bridge mode I meant that username and password are to be provided to OS, rather than storing them inside adsl modem. The bridge mode works fine in my Windows XP setup. Nothing special to configure, just need to go to network connections and create a new connection, using username and password. In XP, I'm using DHCP too, so that I don't need to manually confgure interface IP address. That's why I'm sure that my network setup is not a issue. The issue lies somewhere in FreeBSD configuration or somewhere else. Regards -- Jack ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
Hi, Thank you guys for your suggestions, and sharing your experiences with me. This time I deleted old /var/log/ppp.log file, and I did modify /etc/ppp/ppp.conf - just the location of ifaddr line is changed and some more logging options set -nothing else is changed. . The file is this now: /etc/ppp/ppp.conf : default: adsl: set log Phase chat lcp ipcp ccp tun command lqm set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 set device PPPoE:fxp0 set mru 1492 set mtu 1492 set ctsrts off set speed sync set dial enable lqr set login set authname myusername set authkey mypassword set timeout 120 set redial 0 0 # set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0 # now this interface is set up at 2nd line in adsl profile add default HISADDR enable dns nat enable no - Then I rebooted FreeBSD, in verbose mode enabled. After it booted, I started ppp like this: #ppp -ddial adsl Here is the shell o/p along with verbose lines /usr/sbin/ppp -ddial adsl Working in ddial mode Using interface: tun0 ;verbose lines tun0: buf attached WARNING: attempt to domain_add(netgraph) after domainfinalize() - The output of ifconfig is: fxp0: flags=8843UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST metric 0 mtu 1500 options=2009RXCSUM,VLAN_MTU,WOL_MAGIC ether 00:16:d3:0c:42:22 inet 192.168.1.2 netmask 0xff00 broadcast 192.168.1.255 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL media: Ethernet autoselect (100baseTX full-duplex) status: active fwe0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500 options=8VLAN_MTU ether 06:e4:0a:1b:50:36 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL ch 1 dma -1 fwip0: flags=8802BROADCAST,SIMPLEX,MULTICAST metric 0 mtu 1500 lladdr 6.e4.a.0.28.1b.50.36.a.2.ff.fe.0.0.0.0 nd6 options=29PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL lo0: flags=8049UP,LOOPBACK,RUNNING,MULTICAST metric 0 mtu 16384 options=63RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x9 inet 127.0.0.1 netmask 0xff00 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500 options=8LINKSTATE nd6 options=21PERFORMNUD,AUTO_LINKLOCAL Opened by PID 1731 - The /var/log/ppp.log file contents: http://justpaste.it/1fcw Is there some standard sequence for the contents of /etc/ppp/ppp.conf ? I guess that may be the problem. The bridge mode works fine in my Windows XP setup. Nothing special to configure, just need to go to network connections and create a new connection, using username and password. In XP, I'm using DHCP too, so that I don't need to manually confgure interface IP address. That's why I'm sure that my network setup is not a issue. The issue lies somewhere in FreeBSD configuration or somewhere else. On Tue, Oct 16, 2012 at 9:19 PM, Mark Blackman m...@exonetric.com wrote: On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote: I 'll try mpd5. Thanks. Actually, I was concerned with userland ppp, becoz of the scenarios where we have a FreeBSD machine and the only way to connect to internet is an adsl modem in bridge mode (assuming the mode in modem, can't be changed). In such case the only utilty is ppp, which can be of help. Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe I'm missing your point. Mark, what I meant to say is when we have, say a fresh FreeBSD install, then the only service we have at expose is ppp. To be able to use mpd5, or other ports/packages we first need to connect to internet then only we can install/use mpd5. So, by default we are stuck at using ppp builtin with FreeBSD. :( By bridge mode I meant that username and password are to be provided to OS, rather than storing them inside adsl modem. PS: I sent this mail with /var/log/ppp.log contents yesterday but it seems that list moderator rejected the post due to its large size. So, I'm pasting the link for contents of /var/log/ppp.log Regards -- Jack ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On 16 Oct 2012, at 16:08, Jack jacks.1...@gmail.com wrote: Hi I'm new as a FreeBSD user, and trying to configure my pppoe connection. [snip] fxp0 is the ethernet interface of my PC via which adsl modem is connected. Any suggestions ... Consider using the ports mpd5 daemon for a PPPoE connection instead. I had a lot of trouble getting PPPoE to work with userland 'ppp', but mpd5 worked fine. - Mark ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On Tue, Oct 16, 2012 at 8:49 PM, Mark Blackman m...@exonetric.com wrote: On 16 Oct 2012, at 16:08, Jack jacks.1...@gmail.com wrote: Hi I'm new as a FreeBSD user, and trying to configure my pppoe connection. [snip] fxp0 is the ethernet interface of my PC via which adsl modem is connected. Any suggestions ... Consider using the ports mpd5 daemon for a PPPoE connection instead. I had a lot of trouble getting PPPoE to work with userland 'ppp', but mpd5 worked fine. - Mark I 'll try mpd5. Thanks. Actually, I was concerned with userland ppp, becoz of the scenarios where we have a FreeBSD machine and the only way to connect to internet is an adsl modem in bridge mode (assuming the mode in modem, can't be changed). In such case the only utilty is ppp, which can be of help. I'm using FreeBSD 9.1 RC-2. Regards -- Jack ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote: I 'll try mpd5. Thanks. Actually, I was concerned with userland ppp, becoz of the scenarios where we have a FreeBSD machine and the only way to connect to internet is an adsl modem in bridge mode (assuming the mode in modem, can't be changed). In such case the only utilty is ppp, which can be of help. Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe I'm missing your point. - Mark ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On 16 Oct 2012, at 16:49, Mark Blackman m...@exonetric.com wrote: On 16 Oct 2012, at 16:38, Jack jacks.1...@gmail.com wrote: I 'll try mpd5. Thanks. Actually, I was concerned with userland ppp, becoz of the scenarios where we have a FreeBSD machine and the only way to connect to internet is an adsl modem in bridge mode (assuming the mode in modem, can't be changed). In such case the only utilty is ppp, which can be of help. Ok, usually bridge mode implies PPPoE and mpd5 does PPPoE. Maybe I'm missing your point. More accurately, bridge mode (on the modem) means your FreeBSD box will need to be the termination point of the PPPoE link rather than the modem itself and so you need to run something to terminate the PPPoE packets and mpd5 will do that (among other things). - Mark ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On Tue 2012-10-16 20:38:47 UTC+0530, Jack (jacks.1...@gmail.com) wrote: I'm new as a FreeBSD user, and trying to configure my pppoe connection. After reading handbook and searching on various forums, I prepared the ppp.conf file, and tried starting the ppp via # ppp -ddial adsl Here 'adsl' is the profile name, in /etc/ppp/ppp.conf. I also tried #ppp -auto adsl but the error message was same. ... I use a similar setup here except I use static IPs for both the ADSL modem (in bridge mode) and the FreeBSD box connecting to it. The FreeBSD box then runs a DHCP server (dns/dnsmasq in ports) for any other machines on my LAN to talk to. I'm pasting my related configuration files if they can help. Please tell me if any other files are needed. Nothing really stands out glancing at your configs. I'd be looking for clues in /var/log/ppp.log. tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1500 options=8LINKSTATE inet 10.0.0.1 -- 10.0.0.2 netmask 0xff00 nd6 options=21PERFORMNUD,AUTO_LINKLOCAL Opened by PID 1907 tun0 should have been reassigned a public address here by the remote PPP host (your ISP). Also the MTU is still stuck at 1500 despite you correctly configuring 1492 in ppp.conf. So I think the PPP negotiation is failing. ppp.log may explain why. Mine looks like this: tun0: flags=8051UP,POINTOPOINT,RUNNING,MULTICAST metric 0 mtu 1492 options=8LINKSTATE inet 58.6.247.132 -- 203.215.15.252 netmask 0x Opened by PID 45904 Below is my (edited) rc.conf ppp.conf. I simply start stop the PPP session with service ppp start service ppp stop as root. ## /etc/rc.conf hostname=blizzard.phoenix ifconfig_bge0=inet 192.168.1.4 netmask 255.255.255.0 zfs_enable=YES syslogd_flags=-c gateway_enable=YES sshd_enable=YES inetd_enable=YES fusefs_enable=YES openntpd_enable=YES dovecot_enable=YES named_enable=NO dnsmasq_enable=YES postfix_enable=YES sendmail_enable=NO sendmail_submit_enable=NO sendmail_outbound_enable=NO sendmail_msp_queue_enable=NO ppp_enable=YES ppp_mode=ddial ppp_nat=YES ppp_profile=iinet firewall_enable=YES firewall_script=/etc/ipfw.rules firewall_logging=YES ## /etc/ppp/ppp.conf default: set log phase chat lcp ipcp ccp tun command lqm set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.255 nat enable yes disable lqr disable ipv6cp set echoperiod 30 enable echo iinet: set device PPPoE:bge0 set authname myusername set authkey mypassword set dial set login set mru 1492 set mtu 1492 set redial 15 0 add default HISADDR ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: pppoe configuration and dns name resolution
On Tue, 16 Oct 2012 20:38:47 +0530, Jack wrote: I'm new as a FreeBSD user, and trying to configure my pppoe connection. I've been using PPPoE with a DSL modem for many years, using FreeBSD 4, 5 and 7 with the system's PPPoE tools. The IP was provided to the computer directly, so no DHCP in the modem involved (real modem mode). In /etc/ppp/ppp.conf, I did simply define: myispname: set device PPPoE:xl0 set authname customer1234567@myispname set authkey X set dial set login add default HISADDR No further changes to that file. Note that here, xl0 is the interface directly connected to the modem. And in /etc/rc.conf: ifconfig_xl0=192.168.0.1 netmask 0xff00 ppp_enable=YES ppp_profile=myispname ppp_mode=ddial ppp_nat=YES So the system would automatically start the connection at boot time. The tun0 interface would then be associated the public IP designated when the PPPoE connection was up and running. Note that ppp_nat only has been needed to transition the connection through a 2nd NIC into the local net, making my machine a gateway (including related services, such as natd and dhcpd). I also think initializing the NIC xl0 is not entirely needed, maybe up would have been sufficient. For actually being able to use PPPoE, I did add the required components to the kernel, because that approach was state of the art at those times. :-) In /etc/resolv.conf I did add the nameservers published by my ISP. Anything worked automatically, I did not need to make further changes. Basically my setup looks like yours, except that (as I said) I did not use any additional features of the DSL modem (as it did not have such features). :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ... ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
[OT] name resolution... ( was Re: FreeBSD Traffic Shaping )
On Thu, 03 Apr 2008 15:55:05 +1100 Terry Sposato [EMAIL PROTECTED] wrote: Norberto Meijome wrote: On Wed, 2 Apr 2008 14:43:20 +0200 Mel [EMAIL PROTECTED] wrote: I think you'll find that bursts are best counteracted like this: http://www.probsd.net/pf/index.php/Hednod%27s_HFSC_explained#Tips.2FIdeas Mel, can you please confirm this link / FQDN ? no NS defined for the domain... TIA, B SNIP The above link works fine for me here. [EMAIL PROTECTED] ~]$ host www.probsd.net www.probsd.net has address 66.93.16.108 i hear you :D It resolves ok when pointing against a US based Name server : $ nslookup www.probsd.net ns1.octantis.com.au Server: ns1.octantis.com.au Address:207.44.188.147#53 Non-authoritative answer: Name: www.probsd.net Address: 66.93.16.108 It doesn't work when using my machine's named, which relies on Root name servers to get the info. the US server also uses root servers for resolution. US box is linux based, mine is FBSD 7, in AU. I checked with wireshark and i never get any reply from their servers. they seem to reply if I use my ISP's dns... oh well _ {Beto|Norberto|Numard} Meijome The only good bureaucrat is one with a pistol at his head. Put it in his hand and it's goodbye to the Bill of Rights. H.L. Mencken I speak for myself, not my employer. Contents may be hot. Slippery when wet. Reading disclaimers makes you go blind. Writing them is worse. You have been Warned. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Name resolution solved
Hello again: I solved the problem with the name resolution associated with installing ports via ftp, portsnap. 1. I found an erroneous entry in routing tables and removed it and rebooted. There was no route to the default gateway because there was another erroneous gateway entry before it. I believe removing this solved it. 2. I did change a few settings in my primary named.conf file to allow for queries through a fire wall, and found one wrong network address reference. But I did not restart named on that machine, so the changes would not have effected the problem one way or another ( I believe) . I tried pinging a remote site by name and it worked so I went ahead with portsnap fetch and it worked. Somehow I managed to get things right...eventually. Without being a computer scientist/networking engineer/technician I guess I am doing alright on my own, with help from great people on this list. Thanks Jeff K. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Name resolution
On Sat, Oct 27, 2007 at 04:42:02PM -0700, jekillen wrote: I set up a system with a static ip connection to the internet I checked inetd.conf and resolv.conf. Just FYI, inetd.conf shouldn't matter here, as it has to do with running a server, not accessing one. look in resolv.conf, there was no file by that name. So I created one with my local nameservers and the ISP's nameservers. Are the local nameservers on the same CIDR network? The ISP servers? Did you maybe use hostnames here instead of IP addresses? But I am not sure whether these changes require that I reboot the machine. My experience has been that changes to resolv.conf do not require a reboot. The connection is live and working. I can ping another of my static ip addresses, and other machines running on the private nework. But if I ping one of my websites by name the ping cannot find it. so I know it is a resolver issue, with no name server running on this machine. Are these on the same network? Did you set your gateway correctly? The command netstat -nrf inet should probably list a default route. Sometimes people forget this when they use static IPs as you have. This is because after adding the file /etc/resolv.conf I still get the above complaints. I occasionally type resolve.conf instead of resolv.conf when creating this file for the first time. The wonders of tab completion can make me unaware of the problem for awhile. Could this possibly be the problem? Do you have any sort of firewall active on this computer? If so, outgoing connections to port 53 (UDP and TCP) should be allowed for DNS to work. Erik ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Name resolution
Hello: I have been trying to tame the use of the ports mechanisms. I set up a system with a static ip connection to the internet and when I run: pkg_add -r csup-without-gui (verbatim from the freebsd handbook I downloaded just a few days ago) I get this: Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/ Latest/csup-without-gui.tbz: No address record pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/ Latest/csup-without-gui.tbz' by URL I checked inetd.conf and resolv.conf. ftp is working in inetd.conf but when I went to look in resolv.conf, there was no file by that name. So I created one with my local nameservers and the ISP's nameservers. All of my servers are connected to local network and public. I have the name servers set to respond to requests from public network only (I do not want anyone finding out the address numbers I use on the private network) But I am not sure whether these changes require that I reboot the machine. The connection is live and working. I can ping another of my static ip addresses, and other machines running on the private nework. But if I ping one of my websites by name the ping cannot find it. so I know it is a resolver issue, with no name server running on this machine. I have to assume there is a local resolver, but since it is just a library, and not a process, as I understand it, I am thinking that something needs to be redone to use the file with the changes. This is because after adding the file /etc/resolv.conf I still get the above complaints. I am doing this to keep in step with FreeBSD and I have a lot of software I want to install for use with email. In the past I have bypassed ports with programs like Apache, php, mysql and have had little problems. But now I am 'growing up' to the idea that managing changes and removals will be much easier if I do use ports. I just need to figure out what it wants and expects, and what I can and should expect. For instance, If I want to install Apache with php with gd and a lot of other extensions that have to be built separately by hand so php can include them and/or use them, how is that accomplished with ports? Or, suppose I have Apache already installed and want to install ssl. In the manual method ssl has to be prebuilt and configured specific to Apache before Apache is built. Could I expect a series of configure questions from the ports installation process to pick and choose what I want included, or how I want it configured? Thanks in advance Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Name resolution
On Sat, 27 Oct 2007 16:42:02 -0700 jekillen [EMAIL PROTECTED] wrote: Hello: I have been trying to tame the use of the ports mechanisms. I set up a system with a static ip connection to the internet and when I run: pkg_add -r csup-without-gui (verbatim from the freebsd handbook I downloaded just a few days ago) I get this: Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/ Latest/csup-without-gui.tbz: No address record It's called cvsup-without-gui, but you don't actually need it because csup (a rewrite in C of the non-gui version of cvsup) is in the base system. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Name resolution
On Oct 27, 2007, at 4:54 PM, RW wrote: On Sat, 27 Oct 2007 16:42:02 -0700 jekillen [EMAIL PROTECTED] wrote: Hello: I have been trying to tame the use of the ports mechanisms. I set up a system with a static ip connection to the internet and when I run: pkg_add -r csup-without-gui (verbatim from the freebsd handbook I downloaded just a few days ago) I get this: Error: FTP Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6.2-release/ Latest/csup-without-gui.tbz: No address record It's called cvsup-without-gui, but you don't actually need it because csup (a rewrite in C of the non-gui version of cvsup) is in the base system. thank you; your right it is cvsup, but the handbook indicates that I could use csup in place of cvsup in the command line on v6.2 and up. But that does not seem to effect the resolver issue (unless I am mistaken here and the resolver is actually working and it is just the reference) Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Name resolution
thank you; your right it is cvsup, but the handbook indicates that I could use csup in place of cvsup in the command line on v6.2 and up. But that does not seem to effect the resolver issue (unless I am mistaken here and the resolver is actually working and it is just the reference) Jeff K Try pinging google. If it works, great. If not, then the simplest way I've found to read local changes to resolv.conf into the system is to boot into single user mode and then ctrl-d out of it. Just type: shutdown NOW And you'll be taken to single user mode. Assuming your resolv.conf is correct, great. If not, we'll work on fixing that. James ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sendmail name resolution
Sendmail uses the system calls to resolve names. You need to check: /etc/nsswitch.conf In that file check the hosts line, this gives the order for hostname resolution, typically it is files then dns. Then you should check your /etc/hosts file to be sure that localhost is there and correct. Also check /etc/resolve.conf that you have the correct nameservers for dns lookups. -Derek At 08:28 PM 3/18/2007, jekillen wrote: Hello: Where does sendmail look to find out who it is? Resolve.conf? It keeps throwing up messages that it cannot resolve the name localhost, or that is the way I am interpreting the messages. FreeBSD v6.2 generic Thanks in advance; Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED] -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks transtec Computers for their support. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: sendmail name resolution
On Mar 19, 2007, at 3:17 AM, Derek Ragona wrote: Sendmail uses the system calls to resolve names. You need to check: /etc/nsswitch.conf In that file check the hosts line, this gives the order for hostname resolution, typically it is files then dns. Then you should check your /etc/hosts file to be sure that localhost is there and correct. Also check /etc/resolve.conf that you have the correct nameservers for dns lookups. -Derek Thanks, I look into all your suggestions. I think I have gone through this before but I do not install OS's often enough to remember these details. I also have so many books on Unix and related subjects, networking, dns, etc etc that I forget where to find the answer. Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
sendmail name resolution
Hello: Where does sendmail look to find out who it is? Resolve.conf? It keeps throwing up messages that it cannot resolve the name localhost, or that is the way I am interpreting the messages. FreeBSD v6.2 generic Thanks in advance; Jeff K ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Question on FreeBSD name resolution
chris wrote: I just installed 5.1 and have been playing around with it, but I am troubled by an issue with my network configuration. I apologize if this is the wrong list, it seemed to be the most appropriate. I want to at least get the machine working so then I can start working through learning the ins and outs. My FreeBSD box is running on a Dell laptop on my home network where I have three other Windows based machines. All of my machines are configured to use another NT-Based firewall as both the default gateway and DNS server, which is connected out to the Internet via cable. Im using the default network settings that were configured when I installed the system. The network card is configured to use DHCP and when I do an ifconfig I see the Ethernet card has an appropriately assigned IP address netmask.If I ping a website by its DNS name, the name resolves quickly and I get ping responses back pretty quickly (as I would expect). When I use FTP, Telnet, or WWW to try to connect to an address by FQDN, it takes a few minutes to establish the connection. However when I use the associated IP address instead of the FQDN it connects instantly. It seems like the TCP (or at least FTP, WWW Telnet) programs are having an issue with resolving the name. My guess is that they are timing out through trying to resolve via one means, and therefore then try a DNS resolve. Is there a way to determine the order in which the system currently does name resolution? I looked for the host.conf file in my /etc folder and there was one, but even when I added one in it didnt help. Hello, You should be looking in your #/etc/resolv.conf . If you don't have one make it. Ryan Merrick ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Question on FreeBSD name resolution
start with your /etc/hosts. it is first looked up then your bind \jett I just installed 5.1 and have been playing around with it, but I am troubled by an issue with my network configuration. I apologize if this is the wrong list, it seemed to be the most appropriate. I want to at least get the machine working so then I can start working through learning the ins and outs. My FreeBSD box is running on a Dell laptop on my home network where I have three other Windows based machines. All of my machines are configured to use another NT-Based firewall as both the default gateway and DNS server, which is connected out to the Internet via cable. Im using the default network settings that were configured when I ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Question on FreeBSD name resolution
You need to create a resolv.conf file. Your BSD box does not have the required information to be able to resolve ip addresses with FQDNs and it needs to have that information. --charlie _ Get McAfee virus scanning and cleaning of incoming attachments. Get Hotmail Extra Storage! http://join.msn.com/?PAGE=features/es ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Question on FreeBSD name resolution
I just installed 5.1 and have been playing around with it, but I am troubled by an issue with my network configuration. I apologize if this is the wrong list, it seemed to be the most appropriate. I want to at least get the machine working so then I can start working through learning the ins and outs. My FreeBSD box is running on a Dell laptop on my home network where I have three other Windows based machines. All of my machines are configured to use another NT-Based firewall as both the default gateway and DNS server, which is connected out to the Internet via cable. Im using the default network settings that were configured when I installed the system. The network card is configured to use DHCP and when I do an ifconfig I see the Ethernet card has an appropriately assigned IP address netmask. If I ping a website by its DNS name, the name resolves quickly and I get ping responses back pretty quickly (as I would expect). When I use FTP, Telnet, or WWW to try to connect to an address by FQDN, it takes a few minutes to establish the connection. However when I use the associated IP address instead of the FQDN it connects instantly. It seems like the TCP (or at least FTP, WWW Telnet) programs are having an issue with resolving the name. My guess is that they are timing out through trying to resolve via one means, and therefore then try a DNS resolve. Is there a way to determine the order in which the system currently does name resolution? I looked for the host.conf file in my /etc folder and there was one, but even when I added one in it didnt help. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: localhost name resolution problem
Hello! # host localhost localhost.my.domain is a nickname for my.domain my.domain has address 202.x.x.x Someone suggested I check localhost.: # host localhost. Host not found. AFAIK the host command doesn't use /etc/hosts. No matter what is specified in /etc/host.conf, the host command always uses DNS. I got bitten by the same thing a couple of weeks ago. To check whether localhost resolves to 127.0.0.1, try for example 'ping localhost' Given the contents of your hosts file, you should be OK. -- Toomas Aas | [EMAIL PROTECTED] | http://www.raad.tartu.ee/~toomas/ * Do infants enjoy infancy as much as adults enjoy adultery? ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: localhost name resolution problem
From: Ryan Merrick [EMAIL PROTECTED] W. Sierke wrote: hosts contains ::1 localhost.my.domain localhost 127.0.0.1 localhost.my.domain localhost 192.168.100.1 this_machine.my.domain this_machine 192.168.100.2 another_machine.my.domain another_machine ... Your #/etc/hosts file should read for IPv4 localhost 127.0.0.1localhost.Your_local_domain.com localhost There should be another line in #/etc/hosts your host 192.168.100.1My_host.Your_local_domain.com My_host You can add as many lines as you want. with IP address, hostname, nickname. Indeed, but despite the presence of the (IPv4) localhost entry, sendmail was resolving localhost to my internet IP address, rather than 127.0.0.1. It was suggested to me that the name resolution method that sendmail uses would not use /etc/hosts anyway and since that matched my own experience I'm inclined to think it's true, that's why I resorted to adding bind to the system. After further investigation I've seen two approaches to resolving this issue, one to substitute 127.0.0.1 in place of 'localhost' in the sendmail config files[1], the other to add the sendmail config file /etc/mail/service.switch with the line hosts files dns. But now I'm curious about why these options aren't used in the default installation of sendmail on FreeBSD, given that my situation doesn't appear to be unusual. Does sendmail not use the hosts file by default as a security measure? In any case it just feels dirty to me to have to circumvent this issue on a case-by-case basis - i.e. my thinking at the moment is that a dns facility should resolve 'localhost' correctly. Is that a shared sentiment? Or am I just barking up the wrong tree altogether? Thanks, Wayne [1] - by having FEATURE(`msp', `[127.0.0.1]') in submit.mc ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
localhost name resolution problem
Hi, In the course of trying to resolve a problem with sendmail (refusing to deliver even local mail), I saw a note in the sendmail configuration docs which says host localhost must resolve to 127.0.0.1. However, when I checked my system I instead found (details obscured): # host localhost localhost.my.domain is a nickname for my.domain my.domain has address 202.x.x.x Someone suggested I check localhost.: # host localhost. Host not found. I'm not (wasn't) running a nameserver, my host.conf contains the entries hosts and bind in that order, resolv.conf has a single, automatic (from PPPoE) nameserver entry which works, hostname is set to this_machine.my.domain. hosts contains ::1 localhost.my.domain localhost 127.0.0.1 localhost.my.domain localhost 192.168.100.1 this_machine.my.domain this_machine 192.168.100.2 another_machine.my.domain another_machine ... The domain I'm using is one serviced by dyndns.org, and I have a dynamic IP address. I've now installed bind and have got to the point where localhost again resolves to 127.0.0.1 (and sendmail appears to be happy again). Notably in the process of doing this I've changed my domain name from something.fictitious to my.domain. Now, however, (in part): # host -v localhost Trying domain my.domain rcode = 3 (Non-existent domain), ancount=0 Trying domain domain rcode = 0 (Success), ancount=1 The following answer is not authoritative: The following answer is not verified as authentic by the server: localhost.domain 66929 INA 127.0.0.1 # host -v localhost. rcode = 3 (Non-existent domain), ancount=0 Host not found. Even though I've overcome my initial problem, I'm not happy and rather feel as though I've begun creating a monster (and that's the last thing I wanted to be doing when moving to FreeBSD). For example, I feel somewhat uncomfortable that localhost is now resolving from domain instead of my.domain. I'm also confused about how I should be configuring bind when dyndns.org handles the dns for my domain (and whether I should really be running it at all). But I've exhausted my pitiful knowledge and searching capabilities for the moment. The handbook doesn't appear to be complete (following its example doesn't appear to help with the localhost resolution issue) and all of the material I've trawled up from the 'net is either too hard to follow or too old. Thanks, Wayne ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: localhost name resolution problem
W. Sierke wrote: Hi, In the course of trying to resolve a problem with sendmail (refusing to deliver even local mail), I saw a note in the sendmail configuration docs which says host localhost must resolve to 127.0.0.1. However, when I checked my system I instead found (details obscured): # host localhost localhost.my.domain is a nickname for my.domain my.domain has address 202.x.x.x Someone suggested I check localhost.: # host localhost. Host not found. I'm not (wasn't) running a nameserver, my host.conf contains the entries hosts and bind in that order, resolv.conf has a single, automatic (from PPPoE) nameserver entry which works, hostname is set to this_machine.my.domain. hosts contains ::1 localhost.my.domain localhost 127.0.0.1 localhost.my.domain localhost 192.168.100.1 this_machine.my.domain this_machine 192.168.100.2 another_machine.my.domain another_machine ... Your #/etc/hosts file should read for IPv4 localhost 127.0.0.1localhost.Your_local_domain.com localhost There should be another line in #/etc/hosts your host 192.168.100.1My_host.Your_local_domain.com My_host You can add as many lines as you want. with IP address, hostname, nickname. -Ryan ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]