Skip to content

skyfox95/config

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 

Repository files navigation

ics configuration

Configuration of the network adapters file

Edit file /etc/network/interfaces and add the following lines:

auto enp0s3
iface enp0s3 inet static
  address 192.168.0.102
  netmask 255.255.255.0
  gateway 192.168.0.101
#  network 192.168.0.0

Configuration of the internet connection shared (with NAT)

Visit the source.

sudo iptables -A FORWARD -o enp0s3 -i enp0s8 -s 192.168.0.0/24 -m conntrack --ctstate NEW -j ACCEPT
sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
sudo iptables -t nat -F POSTROUTING
sudo iptables -t nat -A POSTROUTING -o enp0s3 -j MASQUERADE

Creates a backup of the rules:

sudo iptables-save | sudo tee /etc/iptables.rules.backup

Edit file /etc/rc.local and add the following lines before the exit 0 line:

ptables-restore < /etc/iptables.rules.backup

Active forwarding

sudo sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

Edit file /etc/sysctl.conf and uncomment the following line

net.ipv4.ip_forward=1

Client configuration

sudo ip route add default via 192.168.0.101

Edit file /etc/resolvconf/resolv.conf.d/base and add the following lines

# Google dns
nameserver 8.8.8.8
nameserver 8.8.4.4

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published