| View previous topic :: View next topic |
| Author |
Message |
MJzak Forum Newbie

Joined: 06 Mar 2008 Posts: 2
|
Posted: Thu Mar 6, 2008 7:16 am Post subject: Home setup / cable modem |
|
|
| Hello, Is it possible to setup Vyatta on a home network without a static IP address from my ISP? The config would be to have one interface on the router connected directly to the ISP cable modem. I don't see how this would be possible without using a static address or using a router that is able to work with a DHCP setup like a Linksys or other home products. This router would be between the cable modem and the Vyatta router. Thanks |
|
| Back to top |
|
 |
jfletcher Vyatta Employee

Joined: 26 Feb 2008 Posts: 684
|
Posted: Thu Mar 6, 2008 7:49 am Post subject: Home setup / cable modem |
|
|
VC4 supports DHCP address assignment, so if your ISP supports it you
can use it to get your dynamic IP address.
Best,
Justin
On Thu, Mar 6, 2008 at 7:16 AM, MJzak wrote:
| Quote: |
Hello, Is it possible to setup Vyatta on a home network without a static IP
address from my ISP? The config would be to have one interface on the router
connected directly to the ISP cable modem. I don't see how this would be
possible without using a static address or using a router that is able to
work with a DHCP setup like a Linksys or other home products. This router
would be between the cable modem and the Vyatta router. Thanks
-------------------- vyatta forums --------------------
Read this topic online here:
http://www.vyatta.org/forum/viewtopic.php?p=168#168
-------------------- vyatta forums -------------------- |
|
|
| Back to top |
|
 |
stig Vyatta Employee


Joined: 21 Feb 2008 Posts: 1282 Location: silicon valley
|
Posted: Thu Mar 6, 2008 10:43 am Post subject: |
|
|
Here's an example of the syntax for VC4:
| Code: | vyatta@vDUT# set interfaces ethernet eth1 address dhcp
[edit]
vyatta@vDUT# commit
[edit]
vyatta@vDUT# exit
|
Then to see if a dhcp server responded with an address:
| Code: | vyatta@vDUT:~$ show dhcp client leases
interface : eth1
ip address : 50.0.0.75 [Active]
subnet mask: 255.255.254.0
domain name: lab.vyatta.com
router : 50.0.0.1
name server: 50.0.0.2 50.0.0.3
dhcp server: 15.0.0.15
lease time : 60
last update: Thu Mar 6 11:35:31 GMT 2008
expiry : Thu Mar 06 11:36:31 GMT 2008
reason : BOUND
|
|
|
| Back to top |
|
 |
MJzak Forum Newbie

Joined: 06 Mar 2008 Posts: 2
|
Posted: Thu Mar 6, 2008 2:51 pm Post subject: |
|
|
| Thank you , downloaded VC4 and got it configured. Working fine.... Thanks again. Mike |
|
| Back to top |
|
 |
unicron Active Member

Joined: 03 Apr 2008 Posts: 33
|
Posted: Fri Apr 4, 2008 3:57 pm Post subject: |
|
|
Is it also possible to get a default-route from this?
I have the same situation, but i can only find the default-route option for pppoe. |
|
| Back to top |
|
 |
stig Vyatta Employee


Joined: 21 Feb 2008 Posts: 1282 Location: silicon valley
|
Posted: Sat Apr 5, 2008 12:04 pm Post subject: |
|
|
| unicron wrote: | Is it also possible to get a default-route from this?
|
If the dhcp server is configured to include a default gateway, it will get applied by the dhcp client.
For example: from the show command below you can see the dhcp server sent us the router as 50.0.0.1.
| Code: | vyatta@vDUT-2:~$ show dhcp client leases
interface : eth1.500
ip address : 50.0.0.75 [Active]
subnet mask: 255.255.254.0
domain name: testlab.org
router : 50.0.0.1
name server: 50.0.0.2 50.0.0.3
dhcp server: 50.0.0.1
lease time : 60
last update: Sat Apr 5 12:53:55 GMT 2008
expiry : Sat Apr 05 12:54:55 GMT 2008
reason : BOUND |
Below you can see in the "show ip route" output that the default route has been added to next hop 50.0.0.1. It shows up as a "K" kernel route since it didn't come from the routing protocols or vyatta cli.
| Code: | vyatta@vDUT-2:~$ show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,
I - ISIS, B - BGP, > - selected route, * - FIB route
K>* 0.0.0.0/0 via 50.0.0.1, eth1.500
C>* 50.0.0.0/23 is directly connected, eth1.500
C>* 50.0.0.0/24 is directly connected, eth1
C>* 99.0.0.0/24 is directly connected, tun1
C>* 127.0.0.0/8 is directly connected, lo
C>* 172.16.139.0/24 is directly connected, eth0
|
|
|
| Back to top |
|
 |
unicron Active Member

Joined: 03 Apr 2008 Posts: 33
|
Posted: Sat Apr 5, 2008 12:44 pm Post subject: |
|
|
| Ahhh verry nice thank you!!!! |
|
| Back to top |
|
 |
azrin.aris Forum Newbie

Joined: 27 Mar 2008 Posts: 17
|
Posted: Tue Apr 8, 2008 5:12 am Post subject: |
|
|
Hi stig,
can you show how to enable an HTTP server using this current setup. I have almost the same setup but still having problem to open my http server to the Internet.
TIA
Azrin |
|
| Back to top |
|
 |
john.southworth Super User


Joined: 26 Feb 2008 Posts: 302
|
Posted: Thu Apr 17, 2008 8:46 am Post subject: |
|
|
| Quote: | | can you show how to enable an HTTP server using this current setup. I have almost the same setup but still having problem to open my http server to the Internet. |
Does your ISP allow you to have an http server on port 80? I know mine (Cox) doesn't I have to move it to a large numbered port like 10080. |
|
| Back to top |
|
 |
azrin.aris Forum Newbie

Joined: 27 Mar 2008 Posts: 17
|
Posted: Thu Apr 17, 2008 10:44 pm Post subject: |
|
|
| john.southworth wrote: |
Does your ISP allow you to have an http server on port 80? I know mine (Cox) doesn't I have to move it to a large numbered port like 10080. |
Yes they allow it. I have Dynamic WAN configuration |
|
| Back to top |
|
 |
john.southworth Super User


Joined: 26 Feb 2008 Posts: 302
|
Posted: Fri Apr 18, 2008 3:29 am Post subject: |
|
|
Ok, I just wanted to verify the situation
First you need a firewall rule to allow the traffic:
| Code: | rule 1 {
action accept
destination {
port 80
}
protocol tcp
source {
address 0.0.0.0/0
}
state {
established enable
new enable
}
}
|
a NAT rule like:
| Code: | rule 12 {
destination {
port 80
}
inbound-interface "your wan if"
inside-address {
address "webserver address"
port 80
}
protocol tcp
source {
address 0.0.0.0/0
}
type destination
}
|
This should get you going to the outside world.
And if you want to access that webserver from the internal network with the same address (NAT reflection) a lot of other trickery is involved unless that Dynamic WAN configuration just sets a static address for you (A lot of PPPoE DSL is this way). |
|
| Back to top |
|
 |
azrin.aris Forum Newbie

Joined: 27 Mar 2008 Posts: 17
|
Posted: Fri Apr 18, 2008 4:34 pm Post subject: |
|
|
THANK YOU!!!! Now it WORKS!!! Thank you again  |
|
| Back to top |
|
 |
mohand fohand Forum Newbie

Joined: 18 Oct 2009 Posts: 3
|
Posted: Mon Oct 19, 2009 1:39 am Post subject: |
|
|
Hi,
Can you please guide me through the process of configuring nat reflection when the external ip address is dynamic ?
Thank you. |
|
| Back to top |
|
 |
pirateghost Super User

Joined: 10 Mar 2009 Posts: 353
|
|
| Back to top |
|
 |
john.southworth Super User


Joined: 26 Feb 2008 Posts: 302
|
Posted: Tue Oct 20, 2009 5:44 am Post subject: |
|
|
| mohand fohand wrote: | Hi,
Can you please guide me through the process of configuring nat reflection when the external ip address is dynamic ?
Thank you. |
This is unfortunately not easy. The nat reflection work around involves using the IP on the interface as one of the options in a nat rule. I haven't found a good way around this. You can do it with some odd trickery, but it breaks occasionally. |
|
| Back to top |
|
 |
|