Install SNMP (Simple Network Management Protocol) on Debian     I’m writing this tutorial to help other that may have the same problem I had. Let me explain to you: I have a Debian server called debian1 which has external ip 1.1.1.1 on eth0 and a local ip 192.168.1.1 on eth0:1, and a second Debian server called debian2 which only has 192.168.1.2 local ip on eth0. I need to access debian2 with ssh from the internet. I cant do that directly because debian2 does not have an external ip address to connect to the internet. But we can use a port forwarding rule on debian1 so that I can access debian2 trough debian1 on a specific port. The only command you have to use is:

 

iptables -A PREROUTING -t nat -p tcp -i eth0 –dport 88 -j DNAT –to 192.168.1.2:22

after entering this command debian1 will forward any request on port 88 from eth0 to 192.168.1.2 on port 22. Now all I have to do is to enter 1.1.1.1 port 88 in putty and I can log-in to debian2 trough ssh. That’s it short and simple about port forwarding.

Do you like this article ? Bookmark it on: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • StumbleUpon
  • del.icio.us
  • Reddit
  • bodytext
  • Technorati
  • Live
  • Google
  • Bumpzee
  • Furl
Tags: , , , ,

Related posts