ifconfig
Videti imena sa ifconfig. U primeru je:
eth0 10.0.0.1 <--- moja mreža ide u podešavnje za dhcp
eth1 <--- ima net spolja dobijen dhcp-om
forwarding
Editovati /etc/sysctl.conf ukloniti # ispred net.ipv4.ip_forward=1
Propustiti:
Propustiti:
iptables --table nat --append POSTROUTING --out-interface eth1 -j MASQUERADE
iptables --append FORWARD --in-interface eth0 -j ACCEPT
autoload pravila ukoliko nije instaliran iptables-persistent
apt-get install iptables-persistentOdgovoriti sa Y da li se želi sačuvati postoječa pravila
autoload pravila ukoliko je bio instaliran iptables-persistent
iptables-save > /etc/iptables/rules.v4
instalirati i podesii dhcp
apt-get install isc-dhcp-server
Editovati /etc/dhcp/dhcpd.conf:
ddns-update-style none;
option domain-name "wd.world";
option domain-name-servers 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 10.0.0.0 netmask 255.255.240.0 {
range dynamic-bootp 10.0.0.100 10.0.0.254;
option routers 10.0.0.1;
option subnet-mask 255.255.255.0;
}
option domain-name "wd.world";
option domain-name-servers 8.8.8.8;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 10.0.0.0 netmask 255.255.240.0 {
range dynamic-bootp 10.0.0.100 10.0.0.254;
option routers 10.0.0.1;
option subnet-mask 255.255.255.0;
}
Нема коментара:
Постави коментар