Kenkho 4 Posted April 18, 2016 Share Posted April 18, 2016 (edited) Hello guys, Description of the problem : I actually have an annoying problem (i'm on it since 1 week), I tried many things again and again but no changement. It looks like my Virtual Machine has no connection, here one example of what i cannot do : Representation of the problem : First example root@new-host: # portsnap fetch extract Looking up portsnap.FreeBSD.org mirrors... none found. Fetching public key from portsnap.FreeBSD.org... failed. No mirrors remaining, giving up. Second example root@new-host: # cd /usr/ports/lang/gcc49 root@new-host:/usr/ports/lang/gcc49 # make install result: Screen Some further informations : I'm using Virtual Box - i'm on FreeBSD 9.2 ____ Like you saw I can't update my FreeBSD because of that... If a charitable soul accept to help me I shall be grateful to him, Thanks in advance to you guys Edited September 2, 2022 by Metin2 Dev Core X - External 2 Internal Link to comment Share on other sites More sharing options...
iltizio 217 Posted April 18, 2016 Share Posted April 18, 2016 for test your connection try to ping google.com and a public ip like 8.8.8.8 root@new-host: # ping google.com root@new-host: # ping 8.8.8.8 If the second work and the first not work, you have a problem with DNS. Go to /etc/resolv.conf and add some name server like this: nameserver 8.8.8.8 nameserver 8.8.4.4 If the second don't work, you have some problem with connection. The connection setup depend on what do you want. If you want to create a local VM, you can easly use DHCP. Edit /etc/rc.conf with: ifconfig_em0="DHCP" change em0 to your interface name. You can find it running ifconfig. Make sure the default router is not set. The DHCP may configure it for you. Next shoutdown your machine with init 0 and go to Virtual box on network cards for your VM and set it to NAT. Start and test. If it don't work post your /etc/rc.conf file and the output of ifconfig command. 1 Link to comment Share on other sites More sharing options...
Kenkho 4 Posted April 18, 2016 Author Share Posted April 18, 2016 (edited) Thanks for your answer iltizio Result of the first ping : root@new-host: # ping google.com ping: cannot resolve google.com: Host name lookup failure Result of the second ping : root@new-host: # ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8): 56 data bytes ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host ping: sendto: No route to host indefinitely the same message. (it doesn't stop) Screen of my network configuration : Screen Screen of my 'ifconfig' : Screen _____ I did all you told me to do but nothing changed Thank you for helping me Edited September 2, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
iltizio 217 Posted April 18, 2016 Share Posted April 18, 2016 Please, post here your /etc/rc.conf file. The mistake is in this file. 1 Link to comment Share on other sites More sharing options...
Kenkho 4 Posted April 18, 2016 Author Share Posted April 18, 2016 Thank you again for your answer, After your indications, I changed some things on my networking sysinstall but failed somewhere then now I cannot access to winscp and show you rc.conf... Do you have any example on how to configure a local connection ? I means after that: sysinstall --> configure --> networking --> no (for ipv6) --> yes (for dhcp) Thanks to you in advance Link to comment Share on other sites More sharing options...
iltizio 217 Posted April 19, 2016 Share Posted April 19, 2016 I'm sorry, use Bridge on your virtual network card on virtualbox, not NAT. You can view or edit your files also on console. To see /etc/rc.conf do that: cat /etc/rc.conf 1 Link to comment Share on other sites More sharing options...
Kenkho 4 Posted April 19, 2016 Author Share Posted April 19, 2016 (edited) Hello iltizio, thank you for your answer; Contents of rc.conf : hostname="home" ifconfig_em0="DHCP" ifconfig_em0="inet 192.168.1.86" keymap="fr.iso.kbd" sshd_enable="YES" ftpd_enable="YES" mysql_enable="YES" fsck_enable="YES" background_fsck="YES" dumpdev="NO" I don't know if it helps but here is a screen of my network details : Screen Screen of the actual 'ifconfig' : Screen Screen of my virtual machine network settings : Screen ________ Sorry for my lack of knowledge but I don't see any 'Bridge' (maybe I can't find it because in french it's otherwise called...). I only have those ones : Screen Thanks to you in advance EDIT : I had a memory disorder, bridge is 'Accès par pont' here. Yes, I already tried with that configuration but that sadly changed nothing... Edited September 2, 2022 by Metin2 Dev Core X - External 2 Internal 1 Link to comment Share on other sites More sharing options...
iltizio 217 Posted April 19, 2016 Share Posted April 19, 2016 You can't configure two times the same interface. Edit your /etc/rc.conf and delete this line: ifconfig_em0="inet 192.168.1.86" To delete a line open the file with vi: vi /etc/rc.conf now point on the line to delete and press two time the key D on your keyboard. next save and quit: digit :wq and press enter. Next shoutdown your machine and set your network card with Bridge and than start the machine. Re post the previous screen after start and try to ping like my first answer. 1 Link to comment Share on other sites More sharing options...
Kenkho 4 Posted April 19, 2016 Author Share Posted April 19, 2016 (edited) It's working, thank you so much iltizio If someone has the same problem, here's my actual configuration: Virtual machine network settings : Screen resolve.conf : Screen rc.conf : Screen ifconfig : Screen ping google.com : Screen ping 8.8.8.8 : Screen But now, how can I access to WinSCP? I means ifconfig does not return any IP address to log on... Thank you in advance Edited September 2, 2022 by Metin2 Dev Core X - External 2 Internal 1 1 Link to comment Share on other sites More sharing options...
Premium ragem0re 155 Posted April 19, 2016 Premium Share Posted April 19, 2016 Do a DHCPOFFER via sysinstall/bsdconfig again so you'll receive an IP from your network. To login via root user to ssh, edit the file sshd_config in /etc/ssh/ and change the line #PermitRootLogin no to PermitRootLogin yes. 2 Link to comment Share on other sites More sharing options...
Kenkho 4 Posted April 19, 2016 Author Share Posted April 19, 2016 Hello ragem0re, thank you for your answer Permission to log on root was already done; I think it's more complicated than that. When I change: ifconfig_em0="DHCP" to ifconfig_em0="inet 192.168.1.86 netmask 255.255.255.0" I can access to WinSCP, Putty, etc. but I lose the network connection... Must find a way to make it works with winscp and don't lose the network connection. Thank you in advance for your answers, for my part i'll try some things. EDIT : It's fixed, all working well. Thanks guys for your help Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now