Answer the question
In order to leave comments, you need to log in
How to set up routing on a server under CentOS 7?
Good day!
I set up a home server according to this article
. However, something went wrong. Started from scratch.
Given:
CentOS7-minimal,
Dell Dimension 4300 with two network cards:
eth1(192.168.0.203) - "looks" at the provider's side;
eth0(192.168.1.200) - "looks" into the local network.
How to set up routing on the server so that the local network, having an eth0 gateway, gains access to the world?
Answer the question
In order to leave comments, you need to log in
You also need to know the address of the gateway (router) on the provider's side.
1. Enable routing:
- temporary option until reboot: from the command line echo 1 > /proc/sys/net/ipv4/ip_forward (naturally under root or with sudo)
- permanent option: add the line to the /etc/sysctl.conf file net.ipv4.ip_forward = 1 and reload or command sysctl -p
2. Specify default route: route add default gw <provider gateway address>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question