2 public IPs, best setup

Hello,

I have a TP-Link TL-WR1043N/ND v2.
I have 2 fix public IPs assigned from my ISP: 25.25.1.1 and 25.25.1.2
My LAN has DHCP with IPs: 192.168.0.10 - 192.168.0.100.
So far all desktops / phones on the internal network (LAN) use the public IP 1 when accessing the internet (25.25.1.1).
I would like to add the second public IP (25.25.1.2) to a linux server that is on the LAN with IP 192.168.0.100, so the linux server will have public IP 25.25.1.2 while still be able to communicate with other desktops on LAN via the private IPs (192.168.0.10 - 192.168.0.100).

What is the best way to achieve this?

Thank you!

3 Likes

Thanks. For some reason, OpenWRT won't let me edit those files, I get read only filesystem. How can I resolve this issue?

Thank you.

What is the output of
ubus call system board
and
mount

1 Like
root@OpenWrt:~# ubus call system board
{
        "kernel": "3.18.20",
        "hostname": "OpenWrt",
        "system": "Qualcomm Atheros QCA9558 ver 1 rev 0",
        "model": "TP-Link TL-WR1043N\/ND v2",
        "release": {
                "distribution": "OpenWrt",
                "version": "15.05",
                "revision": "r46767",
                "codename": "chaos_calmer",
                "target": "ar71xx\/generic",
                "description": "OpenWrt Chaos Calmer 15.05"
        }
}
root@OpenWrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (ro,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
nfsd on /proc/fs/nfsd type nfsd (rw,relatime)

Thank you.

And this is my current network:

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix '.../48'

config interface 'lan'
        option ifname 'eth1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.0.2'

config interface 'wan'
        option ifname 'eth0'
        option _orig_ifname 'eth0'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr '80.80.80.134'
        option netmask '255.255.255.0'
        option gateway '80.80.80.129'
        option dns '8.8.8.8 1.1.1.1 8.8.4.4 1.0.0.1'

config interface 'wan6'
        option ifname 'eth0'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 4'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6'

config interface 'guest'
        option _orig_ifname 'wlan0-1'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr '192.168.10.1'
        option netmask '255.255.255.0'

I would like to add IP: 80.80.80.132 which is assigned by my ISP.

Well it is highly suggested to first update to a more recent version of Openwrt as you version isn't supported anymore since many years.

Your overlay folder is mounted readonly, first suggest to check what is the content of cat /etc/config/fstab
You also could try mount -o remount,rw /overlay /

3 Likes

Thanks. Will try to upgrade.

Thanks again. Which one of these should I use?
https://mirror.kumi.systems/openwrt/releases/21.02.1/targets/

Is it OK if I simply use the "Flash new firmware image" under the Web GUI?

Thank you.

According to this page:

I assume I should use this one:
http://downloads.openwrt.org/releases/21.02.1/targets/ath79/generic/openwrt-21.02.1-ath79-generic-tplink_tl-wr1043nd-v2-squashfs-sysupgrade.bin

Right? Thank you.

Yes, that is the right file. This upgrade will need to be forced since it is changing from ar71xx to ath79. I don't know if 15.05 has force upgrade in the GUI. Suggest using CLI sysupgrade -F -n. Settings cannot be saved, if you have any elaborate setup be sure to backup your settings first.

4 Likes

Thanks. So, I did a backup via the Web GUI and downloaded the file.

I added file openwrt-21.02.1-ath79-generic-tplink_tl-wr1043nd-v2-squashfs-sysupgrade.bin to /tmp/

What is the correct command to do the upgrade?

Also, once this is done, I can SSH back with the same root password? After this is done, what command should I use to restore my settings? My backup is located under /tmp/
backup-OpenWrt-2021-11-01.tar.gz

Thanks again for all your help.

And one more thing, after the flash, what will be the IP of the router? My current IP is 192.168.0.2, I have something else on 192.168.0.1. If it will default to 192.168.0.1, I will have a conflict and will need to change the current 192.168.0.1 to another IP. Please advise. Thank you.

192.168.1.1
See

1 Like

The upgrade went smoothly and I could restore all my settings, port forwards, virtual zones.
One thing is weird: DHCP does not seem to work. If I set the IP manually on any client, everything works but with DHCP I do not really get an IP address.
My setup is OpenWRT on router and various access points with static IPs and DHCP disabled on access points. How can I debug, why do clients not get an IP address from router DHCP server?

And one more thing. Using arp, I can see an IP that should not be there (192.168.1.1):

192.168.0.40     0x1         0x2             *        br-lan
192.168.0.243    0x1         0x2             *        br-lan
192.168.0.186    0x1         0x2             *        br-lan
192.168.1.1      0x1         0x2             *        eth0
192.168.0.98     0x1         0x2             *        br-lan
192.168.0.216    0x1         0x2              *        br-lan
192.168.0.70     0x1         0x2             *        br-lan
192.168.0.200    0x1         0x2              *        br-lan
192.168.0.103    0x1         0x2              *        br-lan
192.168.0.185    0x1         0x2              *        br-lan
192.168.0.11     0x1         0x2             *        br-lan
192.168.0.137    0x1         0x2             *        br-lan
my public gatewayIP   0x1         0x2              *        eth0

What can be wrong here?

Did you change the LAN address of the router after upgrade?
Show you current /etc/config/network

I changed it back to 102.168.0.2.

config interface 'loopback'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'
        option device 'lo'

config globals 'globals'
        option ula_prefix 'fd2e:95a8:0bf5::/48'

config interface 'lan'
        option proto 'static'
        option netmask '255.255.255.0'
        option ip6assign '60'
        option ipaddr '192.168.0.2'
        option device 'br-lan'

config interface 'wan'
        option _orig_ifname 'eth0'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr '...34'
        option netmask '255.255.255.0'
        option gateway '...29'
        option dns '8.8.8.8 1.1.1.1 8.8.4.4 1.0.0.1'
        option device 'eth0'

config interface 'wan6'
        option proto 'dhcpv6'
        option device 'eth0'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0 1 2 3 4'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '5 6'

config interface 'guest'
        option _orig_ifname 'wlan0-1'
        option _orig_bridge 'false'
        option proto 'static'
        option ipaddr '192.168.10.1'
        option netmask '255.255.255.0'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'eth1'

config interface 'wan132'
        option proto 'static'
        option device 'eth0'
        option ipaddr '...32'
        option gateway '...29'
        list dns '8.8.8.8'

I also managed to add another interface with a 2nd public IP (wan132), and I can now ping the public IP from the router and from lan, but can not ping from the internet (outside).

Actually the IP (192.168.1.1) you see on the eth0 interface would be your WAN provider side. Could it be that additional WAN IP's are not directly configured on the Interface but that they have a private IP that they route the public IP through?
Have you checked with your Provider how you should configure it?

Also always if you have issues with a ping run tcpdump on the interface to see if you at least receive the requesting packet