Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use tun/tap to create a tun NIC tun0 with IP, and I have a real NIC eth0 with IP

then I run a tcp client which binds its socket to and a tcp server binding but I can't establish a tcp connection between them.

so can a tcp client on one NIC connect to a tcp server on the other NIC?


share|improve this question
Most Operating systems will recognize both IPs are local, and will short-circuit the connection. – Zoredache May 17 '13 at 18:05
if I use raw socket to create some TCP SYN with source IP from non-local IP, then how will the tcp server on tun0 react? can I hook(intercept) the following TCP SYN/ACK from tun0? thanks! – user138126 May 17 '13 at 22:26
Heck if I know. What are you trying to do? If you are trying to test something, Wouldn't it be easier to just setup a couple VMs or something? Bind each VM to a different interface? – Zoredache May 17 '13 at 22:42

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.