LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
LinkBack Search this Thread
Old 08-13-2008, 11:03 PM   #1
rajat83
LQ Newbie
 
Registered: Apr 2007
Posts: 20

Rep: Reputation: 0
SNAT with virtual interface not working


Dear All ,
I am facing a trouble in setting SNAT through my virtual interface .
I have 2 LAN cards , one is internal and another is external ,On external I have mentioned 1 virtual ip, but somehow , I am only able to DNAT it no SNAT o virtual ip . Also I am able to do SNATING through my external ip .
But this donot solve my purpose.

Scenario
Internal interface ip = A.A.A.A
Private ip to be Natted = E.E.E.E
External interface ip = B.B.B.B
Virtual ip on External interface = D.D.D.D

I want to do 1:1 nating between E.E.E.E and D.D.D.D
These are the rules which are not working

-A PREROUTING -d D.D.D.D -j DNAT --to-destination E.E.E.E ----->OK
-A POSTROUTING -s E.E.E.E -j SNAT --to-source D.D.D.D ------>Not working


Kindly suggest some way
 
Old 08-13-2008, 11:34 PM   #2
grepmasterd
Member
 
Registered: Aug 2003
Location: Seattle
Distribution: ubuntu, lately
Posts: 181
Blog Entries: 1

Rep: Reputation: 35
seems like it should work, at least the iptables rules look good.

how have you configured your 'virtual ip'? I take it you mean that you just have two IP addrs configured on the outside interface, one on eth0 and one on eth0:0 (or similar), the eth0:0 being the vip you're talking about?

what distro are you using, and what kernel version?
 
  


Reply


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding virtual interface for IP based virtual host pridefc Linux - General 6 03-16-2008 03:52 PM
How to create a virtual interface? Whyte Linux - Networking 2 03-27-2007 01:07 PM
Virtual Interface montrhano Linux - Networking 0 08-28-2006 05:30 AM
SNAT and DNAT on same firewall machine not working gugabaga Linux - Networking 2 02-06-2006 06:25 AM
Bonding a virtual interface frd4460 Linux - Networking 1 08-03-2005 05:02 AM


All times are GMT -5. The time now is 08:46 AM.

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