OpenBSD Network

From Wiki
Jump to: navigation, search

Open BSD Network Configurations

Setting up network configuration

A typical interface configuration file, configured for an IPv4 address, would look like this:

$ cat /etc/hostname.fxp0
inet NONE

Setting up a default gateway

$ cat /etc/mygate

Restarting network interface (em1 in this case)

# sh /etc/netstart em1 

Enabling ip forwarding to route packets

# cat /etc/sysctl.conf | grep forward  
net.inet.ip.forwarding=1        # 1=Permit forwarding (routing) of IPv4 packets