Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-07-2013, 12:35 PM   #16
Ser Olmy
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 2,473

Rep: Reputation: Disabled

Originally Posted by Tabraiz View Post
1. -o will only be effective on tun0 interface whereas -d option which I've chosen is not bonded to any specific interface and will always be effective regardless of any routing change takes place in future.
2. All traffic passes through tun0 interface will have source IP changed to whereas -d ensures that source IP is only modified for a specific IP in this case.
I see your point, but consider this: The tun0 interface exists solely because it serves as a tunnel to the remote network. All traffic going through tun0 is by definition bound for the remote network at the other end of the tunnel.

In his initial post, raghavhosur states that he's been assigned a particular IP address to serve as the source address for any communication with the remote network. He also mentions one of the IP addresses he needs to reach in that network, but there may be others.

By using the "-o tun0" option, we ensure that all traffic going through the tunnel is NATed behind the correct address. If the tunnel definition covers other addresses, traffic to those addresses are NATed as well. The "-d <address>" option, however, only works for that one specific destination address, and the NAT rule will have to be modified should the tunnel definition ever change.

I say leave it to the VPN software to decide what goes through the tunnel or not, and tie the NAT rule to the tunnel interface.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Network configuration failure: "network unreachable" after start-up slackj Linux - Networking 3 10-06-2012 09:09 PM
ifconfig configuration changes are not reflected in the network configuration GUI nkd Linux - Networking 4 12-25-2008 02:17 PM
Slackware 10 network configuration. Problem with 8139 network card drivers ! Padmakiran Linux - Networking 8 03-27-2007 07:48 AM
Network Configuration in Debian (laptop network card) legendaryhwk Linux - Networking 6 04-06-2006 04:59 AM
Network Configuration Hanging in FC4 After Using Wireless Network Wizard Trip in VA Linux - Wireless Networking 2 07-18-2005 09:32 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:49 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration