Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

then I run a tcp client which binds its socket to 202.112.34.49 and a tcp server binding 10.10.10.2. 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?

thanks!

share|improve this question
2  
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

 
discard

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

Browse other questions tagged or ask your own question.