You are not logged in.
Forgive me that simple question. Didn't do it manually for years. I'm missing something obvious. Sclerosis... :-(
On comp1:
# ifconfig eth1 10.0.0.1
# echo 1 > /proc/sys/net/ipv4/ip_forward
# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 192.168.1.1 0.0.0.0 UG 304 0 0 eth0
192.168.1.0 * 255.255.255.0 U 304 0 0 eth0
10.0.0.0 * 255.0.0.0 U 0 0 0 eth1
On comp2:
# systemctl disable wicd # just for avoiding any conflicts
# ip route flush table main # the same
# ifconfig eth0 10.0.0.2
# route add default gw 10.0.0.1
# netstat -r
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
10.0.0.0 * 255.0.0.0 U 0 0 0 eth0
Communication comp1 <-> comp2 works. Communication comp1 <-> extrenal hosts works. Packets from comp2 outside 10.0.0.0 don't pass comp1. `echo 1 > /proc/sys/net/ipv4/ip_forward' and...? What did I forget about?
Last edited by quayasil (2013-05-13 16:06:22)
Offline
forgotten configure NAT on iptables ?
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# iptables-save > /etc/iptables/iptables.rules
# systemctl start iptables
Offline
I don't want NAT. I need just simple routing (it's my private, isolated network).
Last edited by quayasil (2013-05-13 15:52:04)
Offline
Oh Gee! Sorry for this stupid question! Of course: I didn't set up route for 10.0.0.0/8 on 192.168.1.1... Sorry!
Offline
Ok, sorry.
I don't know why isn't working then...
I do same here and is working, only difference is that I use 'ip' not 'ifconfig'
Edit:
Now I've read your message that you forgotten specify subnet mask /8
Last edited by hotvic (2013-05-13 15:55:49)
Offline
Not "forgotten specify subnet mask". I forgot to set up a route for the network 10.0.0.0 on the router with 192.168.1.1: comp2 sends to 10.0.0.1 (comp1), comp1 routes it to its default gw (192.168.1.1, let's call it comp0) but comp0 doesn't know how to route (return) packets back to 10.x.x.x . Something like `route add 10.0.0.0 gw 192.168.1.2' (the address of the eth0 of comp1) was missing on comp0.
Last edited by quayasil (2013-05-13 16:33:25)
Offline