DD-WRT with multiple WAN IP addresses (alias)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
DIrEctQL
DD-WRT Novice


Joined: 17 Dec 2007
Posts: 8

PostPosted: Thu Jan 24, 2008 7:16    Post subject: DD-WRT with multiple WAN IP addresses (alias) Reply with quote
I have a WRT350N router with latest DD-WRT firmware. Today I got new service with 5 static IP addresses. I didn't want to use multiple routers so I did the following with my router:

1. Set second IP (alias) to vlan2 interface

Quote:
ifconfig vlan2:1 x.x.x.2


2. I had to rebuild the iptables rules for some reason or else the new IP wouldn't work.
3. Added "prerouting" rule. It didn't seem necessary but I did it anyway:

Quote:
iptables -t nat -I PREROUTING 2 -p icmp -d x.x.x.2 -j DNAT --to-destination 192.168.1.1


4. That's it!

4.1 Since I have port forwarding of 443 already on the first WAN IP, I created forwarding for second WAN IP

Quote:
iptables -I FORWARD 10 -p tcp -d 192.168.1.20 --dport 80 -j ACCEPT
iptables -I FORWARD 11 -p tcp -d 192.168.1.20 --dport 443 -j ACCEPT
iptables -t nat -I PREROUTING 4 -p tcp -d x.x.x.2 --dport 80 -j DNAT --to-destination 192.168.1.20:80
iptables -t nat -I PREROUTING 5 -p tcp -d x.x.x.2 --dport 443 -j DNAT --to-destination 192.168.1.20:443


I'm new to DD-WRT so I am not sure how to save all of this. Also, looks like whatever is added via GUI is targeting the first WAN IP, so whatever is added later shouldn't be an issue.
Sponsor
0t73r
DD-WRT Novice


Joined: 17 Jul 2010
Posts: 1

PostPosted: Sat Jul 17, 2010 10:08    Post subject: Reply with quote
Hi
I'm using WRT-320N, I wanted to use a second IP address so that I can access my DSL modem which connected to port WAN. However I couldn't access it using "ifconfig vlan2:0 192.168.1.2 netmask 255.255.255.0". The DSL IP is 192.168.1.1.

I've done this before using WRT-54GL, it work fine. Is there any configuration that I need to setup first?
phuzi0n
DD-WRT Guru


Joined: 10 Oct 2006
Posts: 10141

PostPosted: Sat Jul 17, 2010 22:23    Post subject: Reply with quote
It's all explained on the 1:1 NAT wiki guide.

http://www.dd-wrt.com/wiki/index.php/One-to-one_NAT

Edit: @0t73r - What you want is totally different than what the OP did. http://www.dd-wrt.com/wiki/index.php/Access_To_Modem_Configuration

_________________
Read the forum announcements thoroughly! Be cautious if you're inexperienced.
Available for paid consulting. (Don't PM about complicated setups otherwise)
Looking for bricks and spare routers to expand my collection. (not interested in G spec models)
thunde3r
DD-WRT Novice


Joined: 30 Nov 2014
Posts: 3

PostPosted: Sun Nov 30, 2014 10:27    Post subject: PPOE and ip alias on WAN Reply with quote
I have a Dlink router DIR300 with DDWRT, the WAN interface is PPOE, besides that connection i what to setup an fixed ip alias that can accept VPN, i have made the following setting that work only when SPI firewall is disabled.

#!/bin/ash
PATH="/sbin:/usr/sbin:/bin:/usr/bin:${PATH}"
ifconfig vlan2:1 10.*.*.1 netmask 255.255.255.0 broadcast 10.*.*.254
ifconfig vlan2:1 up

The VPN server is set with internal ip of the router 192.168.1.1.

What changes i need to make to be able to activate the firewall and browse the internal network and internet over VPN, i need to change the VPN server ip to ip alias or what?

Thank you!
Per Yngve Berg
DD-WRT Guru


Joined: 13 Aug 2013
Posts: 6856
Location: Romerike, Norway

PostPosted: Mon Dec 01, 2014 15:35    Post subject: Reply with quote
Use ddns to set a domain host you can use to connect the vpn.
thunde3r
DD-WRT Novice


Joined: 30 Nov 2014
Posts: 3

PostPosted: Tue Dec 02, 2014 10:40    Post subject: Reply with quote
Per Yngve Berg wrote:
Use ddns to set a domain host you can use to connect the vpn.

I want to use connection also as a backup when there is no internet connection, i search a little on internet and the name of the connection that i want to setup is Dual Access PPPOE (also called "Russia PPPOE")
Thank you!
tsynik
DD-WRT User


Joined: 18 Apr 2014
Posts: 151

PostPosted: Tue Dec 02, 2014 12:26    Post subject: Reply with quote
thunde3r wrote:

I want to use connection also as a backup when there is no internet connection, i search a little on internet and the name of the connection that i want to setup is Dual Access PPPOE (also called "Russia PPPOE")
Thank you!

Nope! Dual Access PPPoE is different thing. And it's supported by DD-WRT - there is such checkboxes for L2TP/PPtP/PPoE WAN in WebUI. It's in general DHCP + PPPoE (or other P-t-P connection) on WAN interface with routing on both networks, but default GW is only one.
thunde3r
DD-WRT Novice


Joined: 30 Nov 2014
Posts: 3

PostPosted: Wed Dec 03, 2014 12:45    Post subject: Reply with quote
tsynik wrote:
thunde3r wrote:

I want to use connection also as a backup when there is no internet connection, i search a little on internet and the name of the connection that i want to setup is Dual Access PPPOE (also called "Russia PPPOE")
Thank you!

Nope! Dual Access PPPoE is different thing. And it's supported by DD-WRT - there is such checkboxes for L2TP/PPtP/PPoE WAN in WebUI. It's in general DHCP + PPPoE (or other P-t-P connection) on WAN interface with routing on both networks, but default GW is only one.


I don't find the check-boxes u say, the GW will be only one ..the PPPoE,.. the secondary connection is for local access from WAN when PPPoE is not available.
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum