LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
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
  Search this Thread
Old 06-30-2009, 01:20 PM   #1
j-osh
Member
 
Registered: Nov 2008
Location: Madison, WI
Posts: 34

Rep: Reputation: 16
iptables NAT and tun/tap interfaces


I am building a proxy that I can tunnel traffic to and it will forward the traffic for me onto the Internet. The problem is that I have one physical interface "eth0" and two types of traffic on that interface. The traffic to and from the tunnel (on udp.port 8080) and the traffic to and from the internet (assumed not to be udp.port 8080).

So using iptables and the tun/tap devices I have been trying to get this to work but nothing so far has produced any results.

What I want to do is open a udp socket on port 8080 and receive all the traffic from the tunnel and then push this traffic to a tun/tap interface "tun0". Then tun0 would be the internal side of the iptables NAT and "eth0" the external side.

However, if this is done the udp.port 8080 traffic also goes through the NAT which I don't want. Can anyone give some advice and pointers on how to setup iptables to do this or even if it can be done? Also are there trick that have to be done with the Linux routing tables for this to work?
 
  


Reply



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
static route for iptables NAT and tun/tap device j-osh Linux - Networking 2 10-05-2015 06:26 AM
Need help on TUN/TAP vinodl Linux - Networking 1 06-22-2009 11:18 AM
Virtual Interfaces, Bridging, TUN, TAP question for KVM setup (ubuntu server 9.04) mogga Linux - Networking 0 06-22-2009 01:35 AM
tun tap query karan84 Linux - Networking 1 03-26-2007 11:29 AM
Tun/Tap issue minasafwat Linux - Kernel 0 11-14-2006 01:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:19 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration