Utilising 8 Public IP's

iplaywithtoys Yes that is correct.

I did say that earlier in the post I will restate it here for convenience

The block of addresses I have been given can be assumed to be :
56.52.53.0 ---*Cannot use
56.52.53.1 ---Assigned to the router
56.52.53.2 --- To my server
56.52.53.3 --- To NS1
56.52.53.4 --- To NS2
56.52.53.5
56.52.53.6
56.52.53.7 ---*Cannot use

What should my upstream subnet mask be for this block of IP addresses. I was under the impression it should be 255.255.255.248
However, its showing 255.255.255.255 which in my limited knowledge is only one single public IP address.

How does your ISP provide your /29 block? Do you have a separate /32 along with the /29?

As an example, my ISP provides me with a single static /32 which is the WAN (PPPoE) interface of my router.

In addition, my ISP provides a static /29 for me to use as I wish. From my ISP's perspective (and therefore the perspective of the rest of the world), the routing for that /29 goes via the /32.

So, if you're seeing a subnet mask of /32, is that for an address which is in the /29 block, or is it for a separate address entirely?

2 Likes

As far as I am aware they are only providing by block with /29 I don't know how to work out if the router address is /32... but I do know the upstream SNM is 255 and not 248

Which as I have already stated it is a single IP address

So, if you're seeing a subnet mask of /32, is that for an address which is in the /29 block, or is it for a separate address entirely?

The answer is yes it is within the assigned block
As this IP my router assigned address

I am nearly sorted with this... I think...

I have successfully created 3 new interfaces and assigned them to eth0.1
56.52.53.2 --- To my Webserver
56.52.53.3 --- To NS1
56.52.53.4 --- To NS2

I can ping them externally and internally but cannot access them ie no traffic on port 80 or 443 is reaching my Webserver. I have tried with and without port forwarding but still nothing.

The web server is able to ping itself and other external public IP addresses, but not the internal addresses eg 192.168.1.1 this is what I would expect.

I have made sure /etc/resolv.conf has a DNS of 8.8.8.8.

I have confirmed that the Webserver eth0 is up and the correct public IP is assigned.

I'm now lost for what to try next.

How can I open up the router to see my webserver?

I'm not familiar with the tagging/untagging on the OpenWrt switch.

Maybe someone could tell me if this is correct.

LAN1 = N/A
LAN2 = NS1
LAN3 = NS2
LAN4= WEB

Any suggestions would be welcome.

It sounds like the router is responding because of an improper config.

  • What does this mean???
  • Create three interfaces where/and why? :confused:

Doesn't sound like anything suggested. It seems perhaps you're unfamiliar with the use a a subnet?

  • I'd make a VLAN 3 (or eth0.3). Bridged if you need WiFi
  • Add to new firewall zone
  • Then set 56.52.53.1 as that networks router IP
  • Config DHCP as desired (I guess you want it disabled)
  • The subnet mask for /29 is 255.255.255.248 - see: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#IPv4_CIDR_blocks
  • Change Switch by adding a 3rd like
    • number it 3
    • change the untagged ports on VLAN 1/LAN that you want on the new network VLAN 3
    • turn them off on VLAN 1! :warning:
  • Set new firewall zone from network3 to WAN
2 Likes

Many thanks for the input

Like I have been trying to say Networking is not my strongest subject nor is OpenWrt

So how would I do the above mentioned, in a step by step processes, please

Regards

That was the step-by-step. Visit Network > Interfaces > Add - as I surmise you did when creating the incorrect interfaces.

1 Like

I believe this will work. Replace <wan> <ns#.ip> with your setup where appropriate. Rest is about converting these lines to /etc/config/network and /etc/config/firewall or uci.

ip add add 56.52.53.2/29 dev <wan>
ip add add 56.52.53.3/29 dev <wan>
ip add add 56.52.53.4/29 dev <wan>
ip add add 56.52.53.5/29 dev <wan>
ip add add 56.52.53.6/29 dev <wan>
iptables -t nat -A zone_wan_prerouting -i <wan> -d 56.52.53.3 -p udp -m udp --dport 53 -j DNAT --to-destination <ns1.ip>:53
iptables -t nat -A zone_wan_prerouting -i <wan> -d 56.52.53.4 -p udp -m udp --dport 53 -j DNAT --to-destination <ns2.ip>:53
  • Since you insist on using non-OpenWrt commands, methods and syntax with OpenWrt, I won't be able to assist you.
  • This is not how the Wiki, manuals, etc. setup an OpenWrt device.
  • Also, user created rules are not recommended to be added to OpenWrt-created firewall chains.
  • This rule can be added using OpenWrt syntax (or just simply using the GUI)...so that it's added correctly
  • Why are you still improperly assigning all IPs to the router...I thought I also read you're assigning IPs to the devices...this is incorrect as I already noted

:confused:

Why don't you use the web GUI as noted in the "step-by-step" instructions you requested yourself?

I'm confused why you asked for steps, then persist on undertaking other steps not suggested by anyone in the thread.


EDIT: I realize the post wasn't the OP. @ppmm your config (i.e. addining IPs to the router) is what caused the OP's issue.

I do think your example will open services for the OP on the desired IPs, though. :wink:

1 Like

Those commands are intended as PoC only.

Not sure how to configure multiple static IPs under one interface. I've looked here [OpenWrt Wiki] Network basics /etc/config/network

The two iptables rules translate into following according to [OpenWrt Wiki] Firewall configuration /etc/config/firewall

config redirect
	option	name		'NS1'
	option	src		    'wan'
	option	src_dip		'56.52.53.3'
	option	proto		'udp'
	option  src_dport   '53'
	option	target		'DNAT'
	option	dest		'lan'
	option  dest_ip     <ns1.ip>
config redirect
	option	name		'NS2'
	option	src		    'wan'
	option	src_dip		'56.52.53.4'
	option	proto		'udp'
	option  src_dport   '53'
	option	target		'DNAT'
	option	dest		'lan'
	option  dest_ip     <ns2.ip>
1 Like

For tagged VLANs to work, CPU must be enabled with tagged for that VLAN.

To which port is your WAN connection connected?

For me my setup:

VLAN1, CPU LAN1-4 all tagged, WAN off
VLAN2, CPU LAN1-3 all tagged, LAN4 WAN untagged

As my ISP is giving me DHCP, when I connect my machine to port 4, and enable DHCP, it will got the DHCP IP directly from ISP.

lleachii

Yes, it would be a step-by-step if I know how to make a VLAN bridge!!! but I don't!

So what are the steps to make a VLAN bridge?

Since you insist on using non-OpenWrt commands, methods and syntax with OpenWrt,

I'm not insisting any anything, these are just suggestions from forum users.
Besides, I wouldn't know a non-OpenWrt command, method and syntax from an official one.

Give me a break I'm trying to learn here...

How do I do this ?

Change Switch by adding a 3rd like

Change Switch
I only have one switch with 5 ports so how can I change it?

  • number it 3
    Why? can I use 1 or 2 that are already there?
  • change the untagged ports on VLAN 1/LAN that you want on the new network VLAN 3

Can you translate this so that a noobi can understand it, please? I have read it several times... change them to what?

  • turn them off on VLAN 1! :warning:
    What does this even mean?

A step-by-step guide
Some one asked me how I set up my DSL connection in OpenWrt so I gave them a step-by-step guide as follows:

  1. Goto Network>interfaces- then click on "Edit" or click on the "WAN" tab
  2. In the "DSL" section enter the following settings
  3. Annex: Annex A + L + M(all)
  4. Tone: A43C + J43 + A43
  5. Encapsulation mode:PTM/EFM(Packet Transfer mode)
  6. DSL line mode: VDSL
  7. Downstream SNR offset: 0.0 dB
  8. Leave the rest as default and click on "Save and Apply"
  9. click on "Edit" or click on the "WAN" tab again
  10. Click on the "Physical settings tab"
  11. From the drop-down scroll to the bottom of the drop-down and in custom enter
  12. dsl0.101
  13. Click on save and apply
  14. click on "Edit" or click on the "WAN" tab again
  15. Select PPPoE protocol from the drop-down...
  16. at this point you may have click on switch protocols to initialise the new protocol
  17. Enter your user-name and password
  18. Click on save and apply
  19. You should now be able to access the Internet via your router
  20. You may also need to setup your wifi interface

That, is an easy to follow step-by-step guide for anyone!

Can you please explain this I don't understand what it is your doing

Is this a solution or a note??? what is PoC?

If you take just my Web server as an example, it must be assigned a static IP, then a rout to the internet via one of my LAN ports need to be established.

I am doing incorrectly because I don't know what I'm doing, and trying to get information that will help me understand so I can do it correctly.

I am using the GUI!!!!

I'm confused why you asked for steps, then persist on undertaking other steps not suggested by anyone in the thread.

You're confused... Persist? I have taken all information from this thread and implemented them. However, if you would read the thread from the perspective of someone who doesn't have your knowledge you would see how confusing this is.

Can you please be a little more choice-full in your language, you are coming over as angry and impatient?

I really appreciate your input and its frustrating enough without having to explain my misunderstandings.

It's an example of a possible configuration which purports to apply DNAT to incoming DNS queries.

Proof of concept. Or, in other words, a test, a trial, an experiment.

1 Like

Great how do i implement it?