Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
Jep, eth0 is 192.168.10.40, eth1 is 192.168.10.45,
GW: 192.168.10.1
I can ssh in to both IP's from another host.
If I unplug eth1, I can still ssh to eth0.
If I unplug eth0 alone, I can't ssh to eth1 ! I think it's because of the GW and sshd is listening on eth0 ??
Unless configured to listen on a defined ip , sshd will listen to any/all.
Code:
netstat -antpd|grep :22
shows where sshd runs on.
It is possible to have 2 default gateway (sort off). You will need the iproute2 utility to add modify the routing table. Search through the forum, you'll probably find some leads here.
I'm also still learning unix here, but I hope this may work and help you out. If not, I am sorry and please let me know.
first, you need to see what is the original routing table by giving this command
Code:
netstat -rn
it will show you something like this
Code:
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ---------- ---------
default 192.168.137.1 UG 9 3021 e1000g0
127.0.0.1 127.0.0.1 UH 2 244 lo0
192.168.137.0 192.168.137.41 U 3 495 e1000g0
Routing Table: IPv6
Destination/Mask Gateway Flags Ref Use If
--------------------------- --------------------------- ----- --- ------- -----
::1 ::1 UH 2 12 lo0
fe80::/10 fe80::203:1dff:fe0a:981c U 3 0 e1000g0
default fe80::b8cf:cb3a:d1ee:7554 UG 2 0 e1000g0
remember this IP routing tables.
Then you need to run this code
Code:
route add 192.168.10.0 192.168.10.45
--------------------- !!!!!! ------------------------
If it doesn't work then you need to do the reversal and when you re run the netstat -rn, it should be the same
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.