Create a simple gateway server by setting masquerade with firewall-cmd of CentOS8

Constitution

Internet --- eth0-Gateway server -eth1 --- Some server

Check the zone

# firewall-cmd --get-active-zone
public
  interfaces: eth0 eth1

Change zone

# nmcli connection modify eth1 connection.zone internal
# nmcli connection modify eth0 connection.zone external

Check the zone

# firewall-cmd --get-active-zone
external
  interfaces: eth0
internal
  interfaces: eth1

By the way, this is automatically enabled

--Isn't it changed with iptables?

#  cat /proc/sys/net/ipv4/ip_forward
1

Recommended Posts

Create a simple gateway server by setting masquerade with firewall-cmd of CentOS8
Create a simple web server with the Java standard library com.sun.net.httpserver
A story of connecting to a CentOS 8 server with an old Ansible
Create a simple web application with Dropwizard
Create a simple on-demand batch with Spring Batch
[Rails withdrawal] Create a simple withdrawal function with rails
Create a simple bar chart with MPAndroidChart
[Memo] Create a CentOS 8 environment easily with Docker
Create a simple bulletin board with Java + MySQL
Create a web api server with spring boot
Set up a CentOS virtual server with Vagrant
Create a Jar file with two lines of command
Create a user with an empty password on CentOS7
Create a simple demo site with Spring Security with Spring Boot 2.1
Create a blog with Jekyll and GitHub Pages @ Theme setting
Create a simple CRUD with SpringBoot + JPA + Thymeleaf ③ ~ Add Validation ~
Create a SlackBot with AWS lambda & API Gateway in Java
A series of steps to create portfolio deliverables with Rails
Create a simple DRUD application with Java + SpringBoot + Gradle + thymeleaf (1)
Let's create a Docker container that can connect to CentOS 8 with the minimum configuration by SSH
Create a playground with Xcode 12
Create a simple CRUD with SpringBoot + JPA + Thymeleaf ④ ~ Customize error messages ~
A simple sample of displaying a QRCode on a website with JSP + ZXing
A story that I was addicted to twice with the automatic startup setting of Tomcat 8 on CentOS 8