Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

NAT mode as egress gateway

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Physical topology

2. Host Nic settings

Echo "1" > > / proc/sys/net/ipv4/ip_forward # enable routing forwarding

3. Client network configuration

# set the client ip to 10. Segment and the gateway points to 10.1.1.1

# ping Gateway Test

4. Setting the host NAT rule iptables- t nat-A POSTROUTING-s 10.1.1.1ax 24-j SNAT-- to-source 192.168.0." indicates that a message with the original address of 10.1.1.1Universe 24 network segment has been received and forwarded to 192.168.0.9IP and forwarded to iptables- t nat-nL # View nat rule iptables-save > / etc/sysconfig/iptables # Save rules, this folder will read this rule when the folder system restarts So as to automatically load iptables-restore

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report