Re: linux as router
2009/12/14 Adel ESSAFI adeless...@gmail.com 2009/12/14 Andrew Haley a...@redhat.com Adel ESSAFI wrote: Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 00 eth0 192.168.10.0* 255.255.255.0 U 0 00 eth0 link-local * 255.255.0.0 U 1002 00 eth0 default 41.231.2.81 0.0.0.0 UG0 00 eth0 That looks alright. The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? This isn't making very much sense. What is the address of your gateway? If it is 41.231.2.81, then it makes no sense to move it to the 192.168.10 network. Well, I have no great experience with routing but I am in an internet café where I have a limited number of addresses. so my logical configuration is as follows ISP -- ROUTER 41.231.2.81 --LAN-- 41.231.2.83 My SERVER 192.168.10.10 --- LAN -- CLients 102.168.10.X I hope with that figure things are more precise Hi I just need to route packages! I don t need to filter nor to make firewall Thanks for help If you're trying to set up a local network with NAT forwarding, then there's more to do. Andrew. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
Adel ESSAFI wrote: Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 00 eth0 192.168.10.0* 255.255.255.0 U 0 00 eth0 link-local * 255.255.0.0 U 1002 00 eth0 default 41.231.2.81 0.0.0.0 UG0 00 eth0 That looks alright. The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? This isn't making very much sense. What is the address of your gateway? If it is 41.231.2.81, then it makes no sense to move it to the 192.168.10 network. If you're trying to set up a local network with NAT forwarding, then there's more to do. Andrew. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
On Sun, 2009-12-13 at 22:59 +0100, paul van der meij wrote: I don't think that it makes sense to configure a router with one physical network card. If another PC on the same cable segment tries to reach something it needs a router that has connection with more than the same network cable. Not at all. Consider VLANs, VPN routing and now virtualisation - these all create situations where it makes a lot of sense for a host with a single NIC to perform routing. Granted, it might not be the best way to do things for a given situation but it's certainly a valid configuration (and can be very useful for testing). Regards, Bryn. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
On Sun, 2009-12-13 at 22:59 +0100, paul van der meij wrote: I don't think that it makes sense to configure a router with one physical network card. If another PC on the same cable segment tries to reach something it needs a router that has connection with more than the same network cable. greetings, paul 2009/12/13 Adel ESSAFI adeless...@gmail.com Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 0 0 eth0 192.168.10.0* 255.255.255.0 U 0 0 0 eth0 link-local * 255.255.0.0 U 1002 0 0 eth0 default 41.231.2.81 0.0.0.0 UG0 0 0 eth0 The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? note that I have configured the ip forward. echo 1 /proc/sys/net/ipv4/ip_forward Can you help me please. regards -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines It's called 'router on the stick'. While it can be done on dedicated routers (I saw this done on CISCO, don't know if it can be done on Juniper's) it's hard, but not impossible to be done on linux with iptables. One problem though is that iptables does not recognize aliases (like eth0:1). However it can see the traffic on eth0:1 but it will appear as generated on the same device as eth0. So, if you know iptables good enough, you can build some iptables rules to redirect the traffic from internal network to internet. As I said, it's hard, but can be done. Just google for 'iptables virtual interfaces'. OTOH, the short answer is: get yourself a second network card - this will solve your problem. Calin Key fingerprint = 37B8 0DA5 9B2A 8554 FB2B 4145 5DC1 15DD A3EF E857 = Anyone who uses the phrase easy as taking candy from a baby has never tried taking candy from a baby. -- Robin Hood -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
2009/12/14 Andrew Haley a...@redhat.com Adel ESSAFI wrote: Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 00 eth0 192.168.10.0* 255.255.255.0 U 0 00 eth0 link-local * 255.255.0.0 U 1002 00 eth0 default 41.231.2.81 0.0.0.0 UG0 00 eth0 That looks alright. The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? This isn't making very much sense. What is the address of your gateway? If it is 41.231.2.81, then it makes no sense to move it to the 192.168.10 network. Well, I have no great experience with routing but I am in an internet café where I have a limited number of addresses. so my logical configuration is as follows ISP -- ROUTER 41.231.2.81 --LAN-- 41.231.2.83 My SERVER 192.168.10.10 --- LAN -- CLients 102.168.10.X I hope with that figure things are more precise Thanks for help If you're trying to set up a local network with NAT forwarding, then there's more to do. Andrew. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
linux as router
Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 00 eth0 192.168.10.0* 255.255.255.0 U 0 00 eth0 link-local * 255.255.0.0 U 1002 00 eth0 default 41.231.2.81 0.0.0.0 UG0 00 eth0 The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? note that I have configured the ip forward. echo 1 /proc/sys/net/ipv4/ip_forward Can you help me please. regards -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
2009/12/13, Adel ESSAFI adeless...@gmail.com: Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 00 eth0 192.168.10.0* 255.255.255.0 U 0 00 eth0 link-local * 255.255.0.0 U 1002 00 eth0 default 41.231.2.81 0.0.0.0 UG0 00 eth0 The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? note that I have configured the ip forward. echo 1 /proc/sys/net/ipv4/ip_forward Can you help me please. regards Hi http://www.redhat.com/docs/manuals/enterprise/RHEL-4-Manual/en-US/Security_Guide/s1-firewall-ipt-fwd.html since my last post, i have done again the manipulation following the link above. unfortunally, I still do not succeed to make the router works correctly. Can you help plz Adel -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
I don't think that it makes sense to configure a router with one physical network card. If another PC on the same cable segment tries to reach something it needs a router that has connection with more than the same network cable. greetings, paul 2009/12/13 Adel ESSAFI adeless...@gmail.com Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 00 eth0 192.168.10.0* 255.255.255.0 U 0 00 eth0 link-local * 255.255.0.0 U 1002 00 eth0 default 41.231.2.81 0.0.0.0 UG0 00 eth0 The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? note that I have configured the ip forward. echo 1 /proc/sys/net/ipv4/ip_forward Can you help me please. regards -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
On Sun, 2009-12-13 at 22:59 +0100, paul van der meij wrote: I don't think that it makes sense to configure a router with one physical network card. If another PC on the same cable segment tries to reach something it needs a router that has connection with more than the same network cable. Not necessarily, though it'd be more efficient. Also, a single interface cannot act as a firewall. -- [...@localhost ~]$ uname -r 2.6.27.25-78.2.56.fc9.i686 Don't send private replies to my address, the mailbox is ignored. I read messages from the public lists. -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines
Re: linux as router
Hi echo 1 /proc/sys/net/ipv4/ip_forward mind the quotes around the 1 suomi On 2009-12-13 14:08, Adel ESSAFI wrote: Hi list This is the first time I have to configure linux as router. I have a single network card for which I gave to IPs eth0 Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:41.231.X.Y Bcast:41.255.255.255 Mask:255.255.255.0 inet6 addr: fe80::211:5bff:fe72:7fd9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2595 errors:0 dropped:0 overruns:0 frame:0 TX packets:2295 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1876353 (1.7 MiB) TX bytes:328059 (320.3 KiB) Interrupt:21 Base address:0x8000 eth0:1Link encap:Ethernet HWaddr 00:11:5B:72:7F:D9 inet addr:192.168.10.10 Bcast:192.168.10.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 Interrupt:21 Base address:0x8000 and this is the default route [r...@routeur ~]# route Kernel IP routing table Destination Gateway Genmask Flags Metric RefUse Iface 41.231.2.0 * 255.255.255.0 U 0 00 eth0 192.168.10.0* 255.255.255.0 U 0 00 eth0 link-local * 255.255.0.0 U 1002 00 eth0 default 41.231.2.81 0.0.0.0 UG0 00 eth0 The problem now, is when I configure a PC with an IP adress 192.168.10.X and I put the gateway as 192.168.10.10, I do not succeed to ping any PC. How can I route all the packages from eth0:1 to eth0?? note that I have configured the ip forward. echo 1 /proc/sys/net/ipv4/ip_forward Can you help me please. regards -- http://ilovefedora.blogspot.com/ -- PhD candidate in Computer Science Address BP 108, Bureau de poste Tunis republique 1001 Tunis Tunisia tel: +216 97 246 706 fax: +216 71 391 166 -- fedora-list mailing list fedora-list@redhat.com To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines