This is a discussion on Static Route oddity within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hi I have just built an Ubuntu 7.04 Firewall/Gateway and have a very strange static route issue. If I set ...
|
|||||||
| Register | FAQ | Members List | Calendar | Forgotten your password? | Mark Forums Read |
|
|||
|
Hi
I have just built an Ubuntu 7.04 Firewall/Gateway and have a very strange static route issue. If I set my Net dev(eth0) to dhcp and add the static route to a location it works. If I set my Net dev(eth0) to a static IP the static route I am adding doesn't work!!! my static IP I am giving the eth0 is: 10.1.1.186 netmask 255.255.252.0 gateway 10.1.1.2 the static route I am adding is: up route add -net 10.1.1.13 netmask 255.255.255.255 gw 10.1.1.125 This static route is going to a BBIagent system that sits in front of a Linux OC3 FTP service and that static route works on all the windows machines. The fact that is works when I set my eth0 to dhcp tells me it's not a setting in the firewall but possibly a bug in the Ubuntu version? I'm hoping that's not the case. I'm going to post this on the Ubuntu forums as well but I figured I'd give it a shot here as well. Thanks for any input and help anyone can give me. Gary |
| Sponsored Links | ||
|
|
|
||||
|
Sometime order matters try adding default gw first from shell prompt:
Code:
route add -net default gw 10.1.1.2 dev eth0 route add -net 10.1.1.13 netmask 255.255.255.255 gw 10.1.1.125 route -n
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
Unfortunately that didn't work either.
Here's the route -n and ip route show info for when it's DHCP and working. $ sudo route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.1.1.13 10.1.1.125 255.255.255.255 UGH 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 10.1.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth1 0.0.0.0 10.1.1.2 0.0.0.0 UG 0 0 0 eth0 $ sudo ip route show 10.1.1.13 via 10.1.1.125 dev eth0 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.1 10.1.0.0/22 dev eth0 proto kernel scope link src 10.1.2.70 169.254.0.0/16 dev eth1 scope link metric 1000 default via 10.1.1.2 dev eth0 Let me reboot with static and I'll get the same info and see if there's any difference that I can see or you can see. OK..heres the same info but when I have it set to a static IP address $ sudo route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 10.1.1.13 10.1.1.125 255.255.255.255 UGH 0 0 0 eth0 192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1 10.1.0.0 0.0.0.0 255.255.252.0 U 0 0 0 eth0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 eth0 0.0.0.0 10.1.1.2 0.0.0.0 UG 0 0 0 eth0 sudo ip route show 10.1.1.13 via 10.1.1.125 dev eth0 192.168.1.0/24 dev eth1 proto kernel scope link src 192.168.1.1 10.1.0.0/22 dev eth0 proto kernel scope link src 10.1.1.186 169.254.0.0/16 dev eth0 scope link metric 1000 default via 10.1.1.2 dev eth0 Thanks for the quick response as well! Greatly appreciated! Gary Last edited by DACTech; 05-25-2007 at 03:43 AM.. |
|
|||
|
Routing table looks same for both DHCP and Static config. Did ya enable packet forwarding for IPv4???
Code:
sysctl net.ipv4.ip_forward Code:
sudo sysctl net.ipv4.ip_forward=1 Code:
sudo iptables -L -n | less Code:
iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE iptables --append FORWARD --in-interface eth1 -j ACCEPT Code:
more /etc/resolv.conf nameserver 208.67.220.220 Finally ping to your ISP router and namesever Code:
ping 208.67.222.222 Can you ping to your ISP router but not to any other host on internet/intranet? look for firewall Last edited by jerry; 05-25-2007 at 04:20 AM.. |
|
||||
|
Before
169.254.0.0/16 dev eth1 scope link metric 1000 After 169.254.0.0/16 dev eth0 scope link metric 1000 Please use correct routing commands.
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
Funny thing is that I didn't change anything in that regards. I did notice that after I posted my routing tables!
Why would the system change that just by changing the eth0 configuration from dhcp to static? I've tried to delete it but it keeps coming back! Where can I change that manually? Jerry All DNS, IP4 forwarding is set properly. I will look into the IP Tables like you suggested! This forum is really nice to be in! Glad I found it! I took off early from work as my brain was a bit in a mush state from dealing with multiple head scratchers today! I'll try everything tomorrow. Again, thanks for you help on this one. Gary |
|
|||
|
Seems as though it's the avahi-autoipd.action doing this.
Anyone know how to properly manipulate this action to ignore this? Gary P.S..thanks for dealing with my limited knowledge of Linux. I'm learning it as I go here! As if that wasn't obvious |
|
||||
|
can you paste your /etc/network/interfaces file so that I can see what modification you have made so far for static setup..??
On a related note you can use GUI tool much simple and easy to use. Goto System > Administrator > Network; see if you can fix everything using GUI much easier than playing with config file. Make all modification save everything and just reboot system
__________________
Rocky Jr. You may have my body & soul, but you will never touch my pride! If you have knowledge, let others light their candles at it. Certified to work on HP-UX / Sun Solaris / RedHat |
|
|||
|
I'm reinstalling to 6.10 Edgy and will try it from there as I have a feeling it's something with the new 7.04 Feisty Fawn build that's doing it.
Read this: Wired Networking Woes - Ubuntu Forums I'll let you know once 6.10 is up and configured. Gary |
|
||||
|
Quote:
|
![]() |
| Bookmarks |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| No route to host | csvinayak | Linux hardware | 8 | 04-07-2008 06:44 PM |
| No Route to Host | zakaferoz | Mail Servers | 1 | 11-18-2007 09:20 AM |
| Static ip address in Ubuntu Linux howto | raj | Networking, Firewalls and Security | 0 | 01-18-2007 04:18 AM |
| Default Route | puppen | Linux software | 2 | 04-27-2006 12:33 AM |
| Static Route in Linux, permanent | puppen | Linux software | 3 | 04-13-2006 10:06 PM |