Linux.com

altaf123

altaf123

  • Linux.com Member
  • Posts: 1
  • Member Since: 16 Jul 13
  • Last Logged In: 16 Jul 13

Latest Posts

Posted by
Topic
Post Preview
Posted
  • altaf123
    Route all traffic to Loopback with iptables
    Hello ALL.......! I am trying to redirect the traffic on the tun0 interface to loopback and I request you to guide me. I have a tun0 interface and a when a client with an IP of 192.168.254.2 (coming from tun0) wants to access the Internet I do $ iptables -A POSTROUTING -s 192.168.254.2 -t nat -o wlan0 -j MASQUERADE and the client successfully connects to the Internet over WIFI. Now instead of wlan0 I want to redirect all traffic coming from tun0 to Loopback on which I am running a BIND DNS server and also a lighttpd Webserver. I tried with few rules but failed to do so. Can you guide me with the right rule. regards, Altaf
    Link to this post 16 Jul 13

    Hello ALL.......!

    I am trying to redirect the traffic on the tun0 interface to loopback and I request you to guide me.

    I have a tun0 interface and a when a client with an IP of 192.168.254.2 (coming from tun0) wants to access the Internet I do

    $ iptables -A POSTROUTING -s 192.168.254.2 -t nat -o wlan0 -j MASQUERADE

    and the client successfully connects to the Internet over WIFI.


    Now instead of wlan0 I want to redirect all traffic coming from tun0 to Loopback on which I am running a BIND DNS server and also a lighttpd Webserver. I tried with few rules but failed to do so. Can you guide me with the right rule.

    regards,

    Altaf

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board