multiple external IP addresses

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
Ancyent
DD-WRT Novice


Joined: 04 Mar 2014
Posts: 1

PostPosted: Tue Mar 04, 2014 8:32    Post subject: Reply with quote
HI guys, I have a router "TP-LINK TL-WR1043ND"

MY ISP modified my external IP: 82.XXX.XXX.11
But also I have some IP addresse: 85.XXX.XXX.193 netmask 255.255.255.224

I need to assigned it to vlan1 or something like that ... but don't know how.

Code:

ifconfig vlan1 85.186.26.193 netmask 255.255.255.224
ifconfig vlan1 up


This is what i have done.
Sponsor
mbze430
DD-WRT User


Joined: 14 May 2012
Posts: 239

PostPosted: Wed Apr 24, 2019 18:26    Post subject: Reply with quote
First sorry for reviving such an old post back but I have a question.

I also have a Class-C /29 static ips (5 usables)....

My question is can this same script be used to route an ENTIRE bridge/vlan?

for example. I have 192.168.1.x (br0), 192.168.2.x (vlan6), 192.168.3.x(br1), and 192.168.4.x(vlan10)

I want to route all traffic in & out on
WAN ip xxx.xxx.221.99 with 192.168.1.x <---br0
then WAN ip xxx.xxx.221.98 with 192.168.2.x <---VLAN6
then WAN ip xxx.xxx.221.100 with 192.168.3.x <---br1
and so on? <---VLAN10

Will that work?

Because right now, modifying the script to use 192.168.3.1 (gateway) doesn't seem to work because everytime I go on the 192.168.3.1 subnet and do a whatismyip, I always get the static IP I used in the WebGUI setup. VLAN2 is the WAN interface (Broadcom Soc)



Please advice
Code:

ifconfig vlan2:2 xxx.xxx.221.100 netmask 255.255.255.248 broadcast xxx.xxx.221.103
iptables -t nat -I POSTROUTING -o vlan2 -s 192.168.3.0/24 -j SNAT --to xxx.xxx.221.100
iptables -t nat -I PREROUTING -i vlan2 -d xxx.xxx.221.100 -p all -j DNAT --to 192.168.3.0/24
iptables -I FORWARD -i vlan2 -d 192.168.3.1 -p all -j ACCEPT



I do have a concern for one time on here: Line #4
No where in my iptables script would add that. Is that added from somewhere else?
Code:
root@ddwrt-ac3200:/tmp/mnt# iptables -t nat -nL
Chain POSTROUTING (policy ACCEPT)
num  target     prot opt source               destination
1    SNAT       0    --  192.168.3.0/24       0.0.0.0/0           to:xxx.xxx.221.100
2    SNAT       0    --  192.168.1.0/24       0.0.0.0/0           to:xxx.xxx.221.99
3    SNAT       0    --  10.0.0.0/8           0.0.0.0/0           to:xxx.xxx.221.99
4    SNAT       0    --  192.168.3.0/24       0.0.0.0/0           to:xxx.xxx.221.99
5    MASQUERADE  0    --  0.0.0.0/0            0.0.0.0/0           mark match 0x80000000/0x80000000



Using 192.168.3.0/24 will route the entire subnet. However, I am not sure why item line 4 is added in the POSTROUTING and nothing shows up in the PREROUTING to the iptables.

_________________
ASUS RT-AC3200 - Deployed Client's site
ASUS RT-AC5200 - Merlin
ASUS RT-AX88U - Merlin
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
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