Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a linux system (suse linux) with two nic. when i configured it i was getting the outgoing adress from my machine of 1st nic as a source address but now when i request outside it shows the ip address of second nic as a source address. But i want it should be 1st nic. How can i do that.
Not sure I fully understand you, let me see if I get this straight and I will see what I can do to help.
This is what I understand:
You have a machine with 2 network cards you are hoping to setup as some form of gateway/router.
NIC1 should be your inernet facing nic.
NIC2 should be your LAN (private network) facing nic.
When you first set it up and established an internet connection, the outbound packets showed NIC1 as their source address.
Now, for some reason, when you establish an outbound internet connection, the source addresses on those packets is the address of NIC2.
Ok, let me know if that's correct. If it is I have a couple questions:
1) Have you switched your cables around at all? You might have swapped them if they were not properly labelled, although doing so should have given you some network problems (wrong IPs etc... unless you're using DHCP for both NICs)
2) Where are you sniffing the packets from? Do you have another machine between this one and the internet? Between this one and the LAN? Or are you sniffing on this machine itself? Depending on where you are in the routing process you are going to get different results, especially if it's a packet being routed through your machine and not originating there...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.