Ubuntu: Difference between revisions

576 bytes added ,  5 years ago
Line 415:
To verify status:
sudo systemctl status networking.service
 
===== IP Traffic Forwarding =====
 
Enable IPv4 Forwarding:
# sudo su
# echo "1" > /proc/sys/net/ipv4/ip_forward
 
Verify:
# cat /proc/sys/net/ipv4/ip_forward
1
 
Make the change persistent:
# sysctl -a | grep ip_forward
net.ipv4.ip_forward = 1 ==> Copy this line
 
 
# vi /etc/sysctl.conf
net.ipv4.ip_forward = 1 ==> Paste it at the end of this file
 
 
iptables -t nat -A POSTROUTING -o ens192 -j MASQUERADE
iptables -A FORWARD -i ens193 -o ens192 -j ACCEPT
iptables -A FORWARD -i ens193 -o ens192 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables-save
 
===Software Centre===