How to get input settings to rc.conf on the command line

I think he's looking for some "magic" way to persist any system configuration done manually at the prompt to /etc/rc.conf. Doesn't exist.
 
I'm sorry to say it confusingly. Here's what I wanted to know:

In network settings, etc., without writing directly in rc.conf

# ifconfig gi0 create inet6 tunnel xxxx :: yyyy: mtu 1460

You may set it by executing a command like this. However, if nothing is done, the settings will be lost when the PC is restarted. Therefore, I think it is necessary to describe it in rc.conf.

I'm ashamed to say that I don't know how to write it in rc.conf that gives the same instructions as this command. Therefore, I wondered if there was a way to post the command execution status to rc.conf.

If anyone knows, please let me know.
 
Code:
# ifconfig gi0 create inet6 tunnel xxxx :: yyyy: mtu 1460

That translates to
Code:
create_args_gif0="tunnel <local IPv4> <remote IPv4>"
ifconfig_gif0_ipv6="inet6 <local IPv6> <remote IPv6> prefixlen 64"
Change the IP addresses accordingly.

I'm ashamed to say that I don't know how to write it in rc.conf that gives the same instructions as this command.
Nothing to be ashamed off, this is a tricky case, I had quite a bit of trouble setting this up myself.
 
My internet connection environment is IPv4 over IPv6 IPoE (IP over Ethernet), and the tunnel of gif0 is set up only with IPv6. In this case, how should I write the two lines that you taught me earlier?
 
I'm not exactly sure how to do that either. But looking at the command you posted earlier you can try this:
Code:
create_args_gif0="tunnel xxxx:: yyyy::"
ifconfig_gif0="up mtu 1460"
Not sure if this does what you want though, I've never set up an IPv4 over IPv6 IPoE before.
 
Read the RTFM sysrc(8) and then you can do like
sysrc create_args_gif0="tunnel <local IPv4> <remote IPv4>"
sysrc ifconfig_gif0_ipv6="inet6 <local IPv6> <remote IPv6> prefixlen 64"
You can browse (read) through /etc/defaults/rc.conf to see what settings are available & their default values.
 
Read the RTFM sysrc(8) and then you can do like
sysrc create_args_gif0="tunnel <local IPv4> <remote IPv4>"
sysrc ifconfig_gif0_ipv6="inet6 <local IPv6> <remote IPv6> prefixlen 64"
You can browse (read) through /etc/defaults/rc.conf to see what settings are available & their default values.
This isn't the issue though. The OP is asking how to set up the specific IPv4 over IPv6 IPoE configuration he needs and how to translate the ifconfig(8) commands that's known to work to a configuration suitable for rc.conf. The example I gave was for an IPv6 over IPv4 tunnel, which is the wrong kind of tunnel the OP needs.
 
FMLU ifconfig gif0 create inet6 tunnel xxxx :: yyyy: mtu 1460 =
Code:
cloned_interfaces="gif0"
ifconfig_gif0_ipv6="inet6 xxxx :: yyyy:  prefixlen 64"
create_args_gif0="tunnel xxxx :: yyyy: mtu 1460"
Feel free to file in a bug report regarding the fine manpage of gif(4): [wishlist] some wizzard please add an EXAMPLES section
 
# ifconfig gif0 create inet6 tunnel xxxx :: yyyy aaaa :: bbbb up
# route add -inet6 default -intareface0 gif0

How can I put these two lines in rc.conf?
 
You may set it by executing a command like this. However, if nothing is done, the settings will be lost when the PC is restarted. Therefore, I think it is necessary to describe it in rc.conf.
First of all that's the wrong format for entries in /etc/rc.conf. This is right:

Code:
tcp_drop_synfin="YES"
cupsd_enable="NO"
# ifconfig gif0 create inet6 tunnel xxxx :: yyyy aaaa :: bbbb up
# route add -inet6 default -intareface0 gif0

How can I put these two lines in rc.conf?
If I wanted to send those lines from the terminal as entries into /etc/rc.conf I would use:

# echo 'tcp_drop_synfin="YES"' >> /etc/rc.conf
# echo 'cupsd_enable="NO"' >> /etc/rc.conf

Code:
ifconfig gif0 create inet6 tunnel xxxx :: yyyy aaaa :: bbbb up
route add -inet6 default -intareface0 gif0

That looks more like something I'd put in a pf ruleset.
 
Good point read man about sysrc then things make sense I was setting up unbound to start at a iocage jail for wireguard... SirDice helped thanks
 
Back
Top