Debian as router

From RHS Wiki
Revision as of 11:09, 8 October 2018 by Rafahsolis (talk | contribs) (Created page with "# Make a debian box roter ## Enable routing Temporal sudo sysctl -w net.ipv4.ip_forward=1 # Permanent sudo nano /etc/sysctl.conf net.ipv4.ip_forward = 1 ## Create NA...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
  1. Make a debian box roter
    1. Enable routing

Temporal

sudo sysctl -w net.ipv4.ip_forward=1 # 

Permanent

sudo nano /etc/sysctl.conf
   net.ipv4.ip_forward = 1
    1. Create NAT rule at IPTABLES
sudo iptables -t nat -A POSTROUTING -s 15.17.170.215/32 -o tun0 -j MASQUERADE
    1. List iptables nat rules
sudo iptables -t nat -L -n -v