Portál AbcLinuxu, 1. června 2025 08:17
iptables -t nat -A POSTROUTING -s $IP_eth1/24 -j SNAT --to-source=$IP_eth0
eth1
je vnitrni sitovka a eth0
je sitovka smerem do internetu.
Na routeru musis nastavit adresy pro obe sitovky, vychozi branu a nameservery.
IP 192.168.1.0 gw 0.0.0.0 netmask 255.255.255.0 eth1
IP 10.230.4.0 gw 0.0.0.0 netmask 255.255.255.0 eth0
IP default gw 10.230.4.169 netmask 0.0.0.0 eth0
je to správně?
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.