tips:linux:networknamespaces

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tips:linux:networknamespaces [2019/01/24 15:42] – [setup] scipiotips:linux:networknamespaces [2019/01/24 19:03] (current) – [use] scipio
Line 37: Line 37:
 </code> </code>
  
 +permit routing 
 +<code>
 +ip netns exec netns0 sysctl -w net.ipv4.ip_forward=1
 +iptables -t nat -A POSTROUTING -o tun0 -j MASQUERADE
 +</code>
 +
 +
 +inside NS 
 +<code>
 +iptables -t nat -A PREROUTING -d 10.9.0.2 -p tcp --dport 443 -j DNAT --to-destination 10.139.231.1:443
 +</code>
 +
 +<code>
 +curl -k --header "Host: www.xxx.it" https://10.9.0.2:443/Info-ws/services/xxx/
 +</code>
  • tips/linux/networknamespaces.1548340974.txt.gz
  • Last modified: 2019/01/24 15:42
  • by scipio