Connect Another Net Using IP Tunnel

Submitted by lepton on Fri, 10/18/2019 - 12:28

//computer one ip from ifconfig 192.168.1.2  public ip 2.2.2.2  
ip tunnel del ipip0
ip tunnel add ipip0 mode ipip remote 1.1.1.1 local 192.168.1.2
ip addr add 10.0.0.101/24 dev ipip0
ip link set ipip0 up

 

//computer two ip from ifconfig 192.168.100.2  public ip  1.1.1.1
ip tunnel del ipip0
ip tunnel add ipip0 mode ipip remote 2.2.2.2 local 192.168.100.2
ip addr add 10.0.0.102/24 dev ipip0
ip link set ipip0 up

 

//iptables

iptables -I INPUT -p 4 -j ACCEPT
iptables -I INPUT -p icmp -j ACCEPT
sysctl net.ipv4.ip_forward=1

 

//see network data

tcpdump -i eth0 |grep 2.2.2.2

 

//ping ip see available

ping 10.0.0.101

Comments

off white (not verified)

Sun, 12/10/2023 - 20:13

Needed to compose you this little bit of remark to help say thank you once again for your personal precious methods you've documented on this page. It is certainly remarkably generous with you to give extensively exactly what a few individuals could possibly have offered as an ebook to earn some money for their own end, particularly seeing that you could possibly have done it if you ever desired. The tactics also acted like a great way to recognize that other people online have the same fervor just like my own to understand a lot more when it comes to this condition. I'm sure there are thousands of more pleasant opportunities ahead for folks who examine your website.
off white https://www.offwhitesoutlet.com

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.