Static IP

Gentlemen!

I've configured a static IP in /etc/rc.conf.
Code:
ifconfig_em0="inet 192.168.1.100 netmask 255.255.255.0"
default_router="192.168.1.1"
/etc/resolv.conf
Code:
nameserver 9.9.9.9
Code:
chflags schg /etc/resolv.conf

I cannot get any internet connectivity. I can however ssh into the machine.
Does anyone know why there is no internet anschluss? Ja!
 
If the router is also dns server, shouldn't the defaultrouter ip be the same? Not sure. What kind of internet connection do you have?
I never used something like 9.9.9.9. I wouldn't trust it because it's off the norm. Nothing finds this range a problem?
 
Hallo bios_23498234908,

I believe that the default router is to be specified without an underscore: defaultrouter not default_router.
defaultrouter="192.168.1.1"

back to basics check: your host name is not empty? you are specifying the correct interface? you need ipv6 too? your service is down? you are not blocking connections in a firewall? you have a domain name and forgot to add it?
 
Thank you all.
Code:
hostname="server"
keymap="se.kbd"
ifconfig_alc0="inet 192.168.1.92 netmask 255.255.255.0"
ifconfig_alc0_ipv6="inet6 accept_rtadv"
defaultrouter="192.168.1.1"
sshd_enable="YES"
moused_nondefault_enable="NO"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
pf_enable="YES
Code:
# Generated by resolvconf
nameserver 2a02:920:1200::4
nameserver 2a02:920:4194::2

Still no internet connectivity. Please I need to solve this.
 
Code:
hostname="server"
keymap="se.kbd"
ifconfig_alc0="inet 192.168.1.92 netmask 255.255.255.0"
#ifconfig_alc0_ipv6="inet6 accept_rtadv"
defaultrouter="192.168.1.1"
sshd_enable="YES"
moused_nondefault_enable="NO"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
pf_enable="YES

I had to disable:
#ifconfig_alc0_ipv6="inet6 accept_rtadv"
now it works. Hopefullt someone can make use of it.
 
Back
Top