Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 09-11-2006, 03:02 AM   #16
LQ Newbie
Registered: Aug 2006
Posts: 12

Original Poster
Rep: Reputation: 0

Hi Amitsharma, I'm sorry I have been away for a while. I fixed up the arp problem somehow I think, and I have been trying the iptables rule that you suggested.

I'll draw the connection again just to refresh our memory since it's been a while now.

PC1-eth0 -----> PC2-eth0 ---
PC1-eth1 <----- PC2-eth1 <--

At PC2, I used the following iptables rules that you suggested:

#iptables -t nat -A PREROUTING -p udp -d PC2-eth0-ip -j DNAT --to-destination PC1-eth1-ip
#iptables -A OUTPUT -p udp -o eth0 -j DROP

It still didnt work. Then, I looked at your tutorial and added the following rule (I specified no gateway):

#iptables -t nat -A POSTROUTING -p udp -d PC1-eth1-ip -j SNAT --to-source PC2-eth1-ip

I think the connection works now. With a packet capture program, I can now capture packets at PC1 however the packets destinations are still listed as PC2-eth0-ip, although they are captured at PC1.

What do you think? Is there any way to do a check at PC1-eth1 if it received any packet from PC2-eth1?

Thank you very much for your help.
Old 09-11-2006, 07:59 AM   #17
LQ Newbie
Registered: Aug 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Never mind, I did further tests and the network should be working. Thank you very much amitsharma_26, couldn't have done this without you. Cheers.
Old 09-11-2006, 10:46 AM   #18
Registered: Sep 2005
Location: New delhi
Distribution: RHEL 3.0/4.0
Posts: 777

Rep: Reputation: 31
hey listen dj;
sorry i was away for the evening.

Listen can you change the protocol & use ftp instead of udp(for the test purpose only) ? As i cannot generate udp packets on ma part.. & hence i am asking you to switch over to ftp protocol; so now you can #ftp PC2-eth0-ip from your pc1 box & rest would remain same.
Old 09-14-2006, 07:05 AM   #19
LQ Newbie
Registered: Aug 2006
Posts: 12

Original Poster
Rep: Reputation: 0
Yup i think it works with ftp as well. Cheers. Thanks so so much.


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
Intercept 802.3 packets on egress and redirect until tagged jogress Linux - Wireless Networking 1 07-27-2006 05:32 PM
iptables:redirect ports except for packets destined for fierwall(upto 256 ip) itself mmshekiba Linux - Security 1 02-02-2006 12:08 PM
packets sent VS packets received fsasya Linux - Networking 0 07-18-2004 07:11 PM
encapsulating TCP packets in UDP packets... yoshi95 Programming 3 06-03-2004 02:53 PM
Redirect wonderland Linux - Newbie 3 05-24-2004 11:50 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:02 PM.

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