Upgrading/Installing when I cannot login

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,600
Messages: 37,927

I see there is a problem with my internet connection. I can ping sites, but cannot access them via browser.
my rc.conf has defaultrouter="...." and gateway_enable="YES".
DNS settings in /etc/resolv.conf? gateway_enable should only be turned on if you're routing traffic between interfaces.

Does the order matter?
No, order is irrelevant.
 
OP
S

stream

Active Member

Reaction score: 6
Messages: 103

covacat- thanks for the earlier message and tip regarding proxy.
I edited the dns servers and it is working fine now.
upgrading freebsd.. lets see if it all burns and crashes
 
OP
S

stream

Active Member

Reaction score: 6
Messages: 103

I just missed SirDice earlier message while replying to @covcat
Yes Sir I fixed the resolv.conf.

SirDice do you know if there is a way to wipe out the drive clean while upgrading? Is the only option a fresh install of the OS?
 
OP
S

stream

Active Member

Reaction score: 6
Messages: 103

That would be similar to trying to pull the rug from under the table.


Yes, I'm afraid so.
haha-- exactly yes-- it should be possible with some magic and bit of luck.. to pull the rug from under the table.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,600
Messages: 37,927

Sure, not entirely impossible to do but quite tricky and error-prone.
 
OP
S

stream

Active Member

Reaction score: 6
Messages: 103

DNS settings in /etc/resolv.conf? gateway_enable should only be turned on if you're routing traffic between interfaces.


No, order is irrelevant.
Sir- can you examples of when gateway should be enabled. I don't remember when/why I had this setting. Probably when setting up vmbhyve.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,600
Messages: 37,927

can you examples of when gateway should be enabled. I don't remember when/why I had this setting.
You need gateway_enable to turn on IP forwarding. This means the system can route packets from one interface (your internal LAN interface for example) to another (external WAN interface for example). Or route traffic between two (or more) networks on various vlan(4) interfaces. Or any other ethernet interfaces (em(4),re(4), tap(4), tun(4), etc.)
 

Alain De Vos

Daemon

Reaction score: 546
Messages: 1,890

I don't know if this is taken care of by rc.conf. But in /etc/sysctl.conf.
Code:
net.inet.ip.forwarding=1
net.inet6.ip6.forwarding=1
 

Zirias

Daemon

Reaction score: 1,341
Messages: 2,362

I don't know if this is taken care of by rc.conf. But in /etc/sysctl.conf.
rc.conf(5):
Code:
     gateway_enable
                 (bool) If set to “YES”, configure host to act as an IP
                 router, e.g. to forward packets between interfaces.

     ipv6_gateway_enable
                 (bool) The IPv6 equivalent of gateway_enable.
It does just that. As it's the documented way to enable routing, it's preferred to setting sysctl(8) values manually.
 
OP
S

stream

Active Member

Reaction score: 6
Messages: 103

You need gateway_enable to turn on IP forwarding. This means the system can route packets from one interface (your internal LAN interface for example) to another (external WAN interface for example). Or route traffic between two (or more) networks on various vlan(4) interfaces. Or any other ethernet interfaces (em(4),re(4), tap(4), tun(4), etc.)
Thanks. I sort of get the general idea of ip forwarding in the context of routers. On a practical level though, If the host is running a VM, does the gateway_enable need to be enabled to get the VM to connect to the internet?
 

Alain De Vos

Daemon

Reaction score: 546
Messages: 1,890

With forwarding it will always work. Otherwise it might be dependent on the kind of network-virtualisation that is done.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,600
Messages: 37,927

I sort of get the general idea of ip forwarding in the context of routers.
Basically gateway_enable turns your system into a router. That's the simplest explanation.

If the host is running a VM, does the gateway_enable need to be enabled to get the VM to connect to the internet?
Like Alain De Vos says, it depends on how you've set up the networking of the VMs or jails.
 
OP
S

stream

Active Member

Reaction score: 6
Messages: 103

Basically gateway_enable turns your system into a router. That's the simplest explanation.


Like Alain De Vos says, it depends on how you've set up the networking of the VMs or jails.
Does this pose a security risk in any way? i.e enabling the gateway.
 
Top